Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

How to solve Vue js build error “Cannot read property ‘RGBColor’ of undefined”

Answered
Hyejin Kong asked on August 3, 2020

Hello,
I’m having a problem similar to this issue https://www.flexmonster.com/question/angular-8-support/
 
I’m using vue-flexmonster and it’s working locally,
but when I tried to build my project with webpack using UglifyJsPlugin, it didn’t work.
I got the following error message.
 
flexmonster.full.js:2211 Uncaught TypeError: Cannot read property ‘RGBColor’ of undefined
at flexmonster.full.js:2211
at Object.<anonymous> (flexmonster.full.js:2211)
at Object.<anonymous> (build.admin.159c0879ed07b3035842.js:216454)
at __webpack_require__ (bootstrap 159c0879ed07b3035842:659)
at fn (bootstrap 159c0879ed07b3035842:85)
at Object.<anonymous> (build.admin.159c0879ed07b3035842.js:236647)
at __webpack_require__ (bootstrap 159c0879ed07b3035842:659)
at fn (bootstrap 159c0879ed07b3035842:85)
at Object.<anonymous> (chargeList.vue:283)
at __webpack_require__ (bootstrap 159c0879ed07b3035842:659)
 
The environment I’ve tried is:

  • “vue-flexmonster”: 2.8.12
  • “webpack”: “2.2.1”,
  • “webpack-cli”: “3.3.12”,
  • “webpack-dev-server”: “2.11.2”

Could you give me some workaround or advice I can try?
And I was wondering if you were going to update the module for VueJs.
Thanks

3 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster August 4, 2020

Hi Hyejin,
 
Thank you for posting your question.
 
It seems to us that the mentioned issue might stem from the fact that you’re using the UglifyJsPlugin to minify your code – this might lead to unexpected results if you’re referring to Flexmonster through the flexmonster.full.js or flexmonster.js files since they are already minified & obfuscated.
 
With that in mind, we would suggest configuring webpack in a way that UglifyJsPlugin ignores the JavaScript file with Flexmonster source code.
 
Please let us know if this helps.
 
Regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster August 11, 2020

Hi Hyejin,
 
How are you?
 
We were wondering if you’ve had a chance to check out our response. Was it helpful, or is there still anything we can assist you with?
 
We would be happy to hear your feedback.
 
Best regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster August 18, 2020

Hi Hyejin,
 
Hope you’re doing well.
 
Just checking in to ask if you have any updates on this question. Have you managed to resolve the mentioned issue? 
 
Please let us know what you think.
 
Regards,
Mykhailo

Please login or Register to Submit Answer