distillpub / post--building-blocks

The Building Blocks of Interpretability
https://distill.pub/2018/building-blocks
Creative Commons Attribution 4.0 International
87 stars 27 forks source link

events.js:141 throw er; // Unhandled 'error' event #25

Closed carlosvega closed 6 years ago

carlosvega commented 6 years ago

I get the following error when running npm run dev


> saliency@ dev /home/user/distill
> cross-env NODE_ENV=development webpack-dev-server --hot

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn webpack-dev-server ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)
    at Function.Module.runMain (module.js:444:11)
    at startup (node.js:136:18)
    at node.js:966:3

npm ERR! Linux 4.13.0-38-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! saliency@ dev: `cross-env NODE_ENV=development webpack-dev-server --hot`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the saliency@ dev script 'cross-env NODE_ENV=development webpack-dev-server --hot'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the saliency package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=development webpack-dev-server --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs saliency
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls saliency
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/user/distill/npm-debug.log

with the following content in the log file


0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'dev' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle saliency@~predev: saliency@
6 silly lifecycle saliency@~predev: no script for predev, continuing
7 info lifecycle saliency@~dev: saliency@
8 verbose lifecycle saliency@~dev: unsafe-perm in lifecycle true
9 verbose lifecycle saliency@~dev: PATH: /usr/share/npm/bin/node-gyp-bin:/home/user/distill/node_modules/.bin:/usr/local/texlive/2016/bin/x86_64-linux:/usr/local/texlive/2016/bin/x86_64-linux:/home/user/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-9-oracle/bin:/usr/lib/jvm/java-9-oracle/db/bin
10 verbose lifecycle saliency@~dev: CWD: /home/user/distill
11 silly lifecycle saliency@~dev: Args: [ '-c',
11 silly lifecycle   'cross-env NODE_ENV=development webpack-dev-server --hot' ]
12 silly lifecycle saliency@~dev: Returned: code: 1  signal: null
13 info lifecycle saliency@~dev: Failed to exec dev script
14 verbose stack Error: saliency@ dev: `cross-env NODE_ENV=development webpack-dev-server --hot`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:821:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid saliency@
16 verbose cwd /home/user/distill
17 error Linux 4.13.0-38-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
19 error node v4.2.6
20 error npm  v3.5.2
21 error code ELIFECYCLE
22 error saliency@ dev: `cross-env NODE_ENV=development webpack-dev-server --hot`
22 error Exit status 1
23 error Failed at the saliency@ dev script 'cross-env NODE_ENV=development webpack-dev-server --hot'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the saliency package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     cross-env NODE_ENV=development webpack-dev-server --hot
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs saliency
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls saliency
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
ludwigschubert commented 6 years ago

23 error Make sure you have the latest version of node.js and npm installed. … 19 error node v4.2.6 20 error npm v3.5.2

For npm we're on version 5.6 and for node we're on version 9.7. I will investigate if there's a way to declare those version requirements somehow! If you know, let me know! :D

(And feel free to reopen if the error persists after upgrading, of course.)