npm run mock error 2 npm@3.10.10 3 node@v6.10.0 OS: linux
来源:7-1 开发步骤介绍
napxie
2017-05-25
0 info it worked if it ends with ok
1 verbose cli [ '/root/nvm/versions/node/v6.10.0/bin/node',
1 verbose cli '/root/nvm/versions/node/v6.10.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'mock' ]
2 info using npm@3.10.10
3 info using node@v6.10.0
4 verbose run-script [ 'premock', 'mock', 'postmock' ]
5 info lifecycle react-dianping-webpack@1.0.0~premock: react-dianping-webpack@1.0.0
6 silly lifecycle react-dianping-webpack@1.0.0~premock: no script for premock, continuing
7 info lifecycle react-dianping-webpack@1.0.0~mock: react-dianping-webpack@1.0.0
8 verbose lifecycle react-dianping-webpack@1.0.0~mock: unsafe-perm in lifecycle true
9 verbose lifecycle react-dianping-webpack@1.0.0~mock: PATH: /root/nvm/versions/node/v6.10.0/lib/node_modules/npm/bin/node-gyp-bin:/root/react/m10f3h/node_modules/.bin:~/Android/Sdk/tools:~/Android/Sdk/platform-tools:/root/nvm/versions/node/v6.10.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/sw/jdk1.8.0_131/bin:/root/sw/jdk1.8.0_131/jre/bin
10 verbose lifecycle react-dianping-webpack@1.0.0~mock: CWD: /root/react/m10f3h
11 silly lifecycle react-dianping-webpack@1.0.0~mock: Args: [ '-c', 'node --harmony ./mock/server.js' ]
12 silly lifecycle react-dianping-webpack@1.0.0~mock: Returned: code: 1 signal: null
13 info lifecycle react-dianping-webpack@1.0.0~mock: Failed to exec mock script
14 verbose stack Error: react-dianping-webpack@1.0.0 mock: `node --harmony ./mock/server.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/root/nvm/versions/node/v6.10.0/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/root/nvm/versions/node/v6.10.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid react-dianping-webpack@1.0.0
16 verbose cwd /root/react/m10f3h
17 error Linux 4.6.0-kali1-amd64
18 error argv "/root/nvm/versions/node/v6.10.0/bin/node" "/root/nvm/versions/node/v6.10.0/bin/npm" "run" "mock"
19 error node v6.10.0
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error react-dianping-webpack@1.0.0 mock: `node --harmony ./mock/server.js`
22 error Exit status 1
23 error Failed at the react-dianping-webpack@1.0.0 mock script 'node --harmony ./mock/server.js'.
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 react-dianping-webpack package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node --harmony ./mock/server.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs react-dianping-webpack
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls react-dianping-webpack
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
1回答
-
直接运营 node --harmony ./mock/server.js 或者 node ./mock/server.js 试试
012017-06-30
相似问题