react-forms icon indicating copy to clipboard operation
react-forms copied to clipboard

Fail to run npm start

Open yinglinchen-minted opened this issue 9 years ago • 6 comments

Hi,

I was trying to run npm start after I didn't npm install under examples directory. But I got errors. Here is the npm_error.log. Please help me to figure it out. Thanks!

0 info it worked if it ends with ok 1 verbose cli [ '/Users/yinglinchen/.nvm/versions/node/v0.12.4/bin/node', 1 verbose cli '/Users/yinglinchen/.nvm/versions/node/v0.12.4/bin/npm', 1 verbose cli 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info prestart [email protected] 6 info start [email protected] 7 verbose unsafe-perm in lifecycle true 8 info [email protected] Failed to exec start script 9 verbose stack Error: [email protected] start: node server.js 9 verbose stack Exit status 1 9 verbose stack at EventEmitter. (/Users/yinglinchen/.nvm/versions/node/v0.12.4/lib/node_modules/npm/lib/utils/lifecycle.js:213:16) 9 verbose stack at EventEmitter.emit (events.js:110:17) 9 verbose stack at ChildProcess. (/Users/yinglinchen/.nvm/versions/node/v0.12.4/lib/node_modules/npm/lib/utils/spawn.js:24:14) 9 verbose stack at ChildProcess.emit (events.js:110:17) 9 verbose stack at maybeClose (child_process.js:1015:16) 9 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5) 10 verbose pkgid [email protected] 11 verbose cwd /Users/yinglinchen/src/react-forms/examples 12 error Darwin 14.5.0 13 error argv "/Users/yinglinchen/.nvm/versions/node/v0.12.4/bin/node" "/Users/yinglinchen/.nvm/versions/node/v0.12.4/bin/npm" "start" 14 error node v0.12.4 15 error npm v2.10.1 16 error code ELIFECYCLE 17 error [email protected] start: node server.js 17 error Exit status 1 18 error Failed at the [email protected] start script 'node server.js'. 18 error This is most likely a problem with the react-forms-examples package, 18 error not with npm itself.

yinglinchen-minted avatar Aug 25 '16 01:08 yinglinchen-minted

Hi. You need to run npm install on the main directory as well. examples package.json only has the additional dependencies. I would correct the instruction. so it would be like,

npm install
cd examples
npm install
npm start

bsr203 avatar Aug 25 '16 01:08 bsr203

Hi, I followed your instruction. But I still get same errors. Before I do npm install,I did rm -rf node_modules.

yinglinchen-minted avatar Aug 25 '16 18:08 yinglinchen-minted

I just tried, and it worked though.

git clone https://github.com/prometheusresearch/react-forms.git 
cd react-forms
npm i 
cd examples  
npm i
npm start

I am not sure whether anything to do with your node version as it looks quite old. Mine is

node --version                                                                                               ⏎ develop ◼
v6.3.1
npm --version                                                                                                  develop ◼
3.10.3

also what is the message on the terminal?

bsr203 avatar Aug 25 '16 18:08 bsr203

yeah, my node version is pretty old. That probably cause the problem.

yinglinchen-minted avatar Aug 25 '16 18:08 yinglinchen-minted

node --version v0.12.4 npm --version 2.10.1

I have other programs depending on the nodes version. So I probably will not update the node version.

yinglinchen-minted avatar Aug 25 '16 18:08 yinglinchen-minted

Since you use, nvm, you could test it seperately though. But, I am not sure which dependency is not compatible with your node version.

bsr203 avatar Aug 25 '16 18:08 bsr203