react-isomorphic-boilerplate icon indicating copy to clipboard operation
react-isomorphic-boilerplate copied to clipboard

Error on fresh checkout/install/start

Open tizmagik opened this issue 10 years ago • 5 comments

Just did a clean checkout of this repo and did an npm install then npm start and I get:

after npm start

npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "dev-server"
npm ERR! node v0.12.7
npm ERR! npm  v2.12.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev-server: `node lib/server/webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev-server script 'node lib/server/webpack'.
npm ERR! This is most likely a problem with the isomorphic-demo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lib/server/webpack
npm ERR! You can get their info via:
npm ERR!     npm owner ls isomorphic-demo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/206567/Documents/workspace/scratch/react-isomorphic-boilerplate/npm-debug.log

npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'run', 'dev-server' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/local/bin/node
5 verbose run-script [ 'predev-server', 'dev-server', 'postdev-server' ]
6 info predev-server [email protected]
7 info dev-server [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec dev-server script
10 verbose stack Error: [email protected] dev-server: `node lib/server/webpack`
10 verbose stack Exit status 1
10 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
10 verbose stack     at EventEmitter.emit (events.js:110:17)
10 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
10 verbose stack     at ChildProcess.emit (events.js:110:17)
10 verbose stack     at maybeClose (child_process.js:1015:16)
10 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid [email protected]
12 verbose cwd /Users/206567/Documents/workspace/scratch/react-isomorphic-boilerplate
13 error Darwin 14.4.0
14 error argv "node" "/usr/local/bin/npm" "run" "dev-server"
15 error node v0.12.7
16 error npm  v2.12.1
17 error code ELIFECYCLE
18 error [email protected] dev-server: `node lib/server/webpack`
18 error Exit status 1
19 error Failed at the [email protected] dev-server script 'node lib/server/webpack'.
19 error This is most likely a problem with the isomorphic-demo package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error     node lib/server/webpack
19 error You can get their info via:
19 error     npm owner ls isomorphic-demo
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

tizmagik avatar Jul 23 '15 19:07 tizmagik

I had to do the following to get it to work:

sudo npm install -g webpack-dev-server

caleb3141 avatar Aug 06 '15 21:08 caleb3141

@caleb3141 thanks for that. I think there are some deprecations in my guide now that some packages have been updated.

@tizmagik This is only the first attempt, and then on second try it works right? Something is awry with my build tasks :/

jmfurlott avatar Aug 06 '15 22:08 jmfurlott

Hey, I got the same issue with this. Nice example/walkthrough by the way!

tombee avatar Sep 07 '15 21:09 tombee

It's trying to start the server before the file is built. I added a postinstall script, to build the /lib directory after npm install has finished.

  "scripts": {
    ...
    "postinstall": "npm run build"
  },

acrosson avatar Oct 07 '15 15:10 acrosson

@alexandercrosson good solution. easy enough right?

jmfurlott avatar Oct 07 '15 20:10 jmfurlott