0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info predev [email protected]
6 info dev [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec dev script
9 verbose stack Error: [email protected] dev: RUNMODE=devserver CLEAN=false webpack-dev-server --port 8086 --progress --inline
9 verbose stack Exit status 1
9 verbose stack at EventEmitter.
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess.
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:818:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd E:\duck\workspaces\meicanyun-parent\meicanyun-mp-web\src\mainassets1
12 error Windows_NT 10.0.10240
13 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
14 error node v4.2.4
15 error npm v2.14.12
16 error code ELIFECYCLE
17 error [email protected] dev: RUNMODE=devserver CLEAN=false webpack-dev-server --port 8086 --progress --inline
17 error Exit status 1
18 error Failed at the [email protected] dev script 'RUNMODE=devserver CLEAN=false webpack-dev-server --port 8086 --progress --inline'.
18 error This is most likely a problem with the webpack-demo package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error RUNMODE=devserver CLEAN=false webpack-dev-server --port 8086 --progress --inline
18 error You can get their info via:
18 error npm owner ls webpack-demo
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
system: windows 10
thx.
resolved锛宲arameter passing the wrong way
@fanjunzhi How did you resolve this issue? Can you explain a bit?
@zafree Probably too late but putting this here anyway for future references. Based on npm docs unsafe-perm defaults to true if running in non-root mode and false otherwise. This command basically controls the switch between root and user for running npm scripts. If set to false, running the script in non-root mode will fail. So it is very much probable that you are running the script as a root user. As an alternative to make it work you can do one of the following
npm install -g
instead of npm install
npm config set unsafe-perm true
which will override the default unsafe-perm config
Most helpful comment
@fanjunzhi How did you resolve this issue? Can you explain a bit?