For an old project, after I npm install, try to grunt to build the project, I got the following error
Running "uglify:dist" (uglify) task
File "../onFirefox-build/chrome/content/js/MX.js" created.
Warning: Cannot create property 'subarray' on string
Running "cssmin:compress" (cssmin) task
File ../onFirefox-build/chrome/content/css/global.css created.
Warning: Cannot create property 'subarray' on string
A bug may have been created in the way the grunt-contrib-uglify interacts with the underlying uglifyjs api. To resolve this issue, it is better to upgrade grunt-contrib-uglify.
Based on the guess, I updated the cssmin and uglify versions to latest in package.json, then do npm update.
After that, grunt build passed. Hooray!
Thnaks. worked nicely for me
ReplyDelete