Build system fail


#1

Hello,

Even yesterday all was good. I successfully compiled Semantic-UI flawlessly from a semantic.json file.
When I got to work today, it all started to fail. If install semantic-ui with

npm install semantic-ui

and if I cd’d to semantic dir and gulp build this is what I get:

[12:21:54] Using gulpfile ~/des/js/prj2/semantic/gulpfile.js
[12:21:54] Starting 'build'...
Building Semantic
[12:21:54] Starting 'build-javascript'...
Building Javascript
[12:21:54] Starting 'build-css'...
Building CSS
[12:21:54] Starting 'build-assets'...
Building assets
[12:21:54] Created: dist/components/site.js
[12:21:54] Created: dist/components/site.min.js
[12:21:54] Created: dist/components/form.js
[12:21:55] Created: dist/components/form.min.js
[12:21:55] Created: dist/components/accordion.js
[12:21:55] Created: dist/components/checkbox.js
[12:21:55] Created: dist/components/accordion.min.js
[12:21:55] Created: dist/components/dropdown.js
[12:21:55] Created: dist/components/checkbox.min.js
[12:21:55] Created: dist/components/embed.js
[12:21:56] Created: dist/components/dropdown.min.js
[12:21:56] Created: dist/components/dimmer.js
/home/77363698953/des/js/prj2/semantic/tasks/config/tasks.js:96
          if(error.filename.match(/theme.less/)) {
                           ^

TypeError: Cannot read property 'match' of undefined
    at DestroyableTransform.module.exports.settings.plumber.less.errorHandler (/home/77363698953/des/js/prj2/semantic/tasks/config/tasks.js:96:28)
    at emitOne (events.js:82:20)
    at DestroyableTransform.emit (events.js:169:7)
    at onwriteError (/home/77363698953/des/js/prj2/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:346:10)
    at onwrite (/home/77363698953/des/js/prj2/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:363:11)
    at WritableState.onwrite (/home/77363698953/des/js/prj2/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:118:5)
    at afterTransform (/home/77363698953/des/js/prj2/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:81:3)
    at Immediate.TransformState.afterTransform (/home/77363698953/des/js/prj2/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:58:12)
    at Immediate.immediate._onImmediate (timers.js:435:18)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

I tried to remove node_modules/, ~/.npm/ and semantic/, package-lock.json and semantic.json completely and the error persists. The strange thing is that if I delete node_modules/ and semantic/ and maintain semantic.json with auto-install true and run npm install semantic-ui it installs and compiles sematic-ui fine.

Anyone has any idea what’s going on ? was any dependent package updated today ?

Edit

Removed the whole project, cloned from github again, now the first time I try to gulp build it shows:

module.js:328
    throw err;
    ^
Error: Cannot find module 'gulp-autoprefixer'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/77363698953/des/js/prj2/semantic/tasks/watch.js:13:18)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)

So I tryied npm install -g gulp-autoprefixer and got the same error (“Cannot find module ‘gulp-autoprefixer’”). Then tried npm install gulp-autoprefixer and got back to the first error (“Cannot read property ‘match’ of undefined”).

any help apreciated, thanks

Steps to reproduce

clone this repo: https://github.com/nelson777/prj
then:

npm install
cd semantic
gulp build

-Nelson


#2

I just found that the marvelous machine start scripts in my company
reinstalled an older node version… reinstalled the newest node and all
was fine. Sorry to bother you.