[build] gulp build command not working
See original GitHub issuegulp build
can’t complete the ‘build-assets’ phase due to the following error:
GulpUglifyError: unable to minify JavaScript
Caused by: DefaultsError: `preserveComments` is not a supported option
semantic/tasks/config/tasks.js:96
if(error.filename.match(/theme.less/)) {
^
TypeError: Cannot read property 'match' of undefined
And is NOT fixed by commenting the following lines:
./tasks/config/tasks.js:148: preserveComments : 'some'
./tasks/config/tasks.js:162: preserveComments : false
Steps to reproduce it:
npm install semantic-ui --save
cd semantic/
gulp build
Issue Analytics
- State:
- Created 6 years ago
- Comments:41 (8 by maintainers)
Top Results From Across the Web
Quick fix for "gulp: command not found" error
Quick fix for “gulp: command not found” error · Install the gulp-cli globally · Check that you have npm installed in the /usr/local...
Read more >gulp command not found - error after installing gulp
You forgot to install the gulp-cli package: npm install -g gulp-cli. Then you can run the command "gulp" from the command line.
Read more >gulp: command not found error [Solved] | bobbyhadz
To solve the error "gulp: command not found", install the gulp-cli package globally by running npm install -g gulp-cli and restart your terminal....
Read more >Gulp Build Not Working In Visual Studio But ... - Barret Codes
Recently, this build suddenly stopped working and I couldn't figure out why. It ran just fine from the command prompt, but in Task...
Read more >spfx - All of sudden gulp command not recognizing
Often, it's due to location ref issues (path to the modules when installed globally), so when you run gulp it does not know...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, I found that Uglify plugin changed its options and now preserveComments is obsolete:
https://github.com/gruntjs/grunt-contrib-uglify#deprecated-options-from-2x
So, just replacing in these 2 lines in semantic/tasks/config/tasks.js:
with:
worked for me.
I think I found the problem. This issue … https://github.com/terinjokes/gulp-uglify/issues/265 … and the latest gulp-uglify release notes reveal that release v3.0.0 of gulp-uglify REMOVED the custom option
preserveComments
😃