【问题标题】:Broken package with npm使用 npm 破坏包
【发布时间】:2015-07-16 16:40:36
【问题描述】:

我正在尝试运行此应用 [surveyman][1] 但没有成功, $npm run start 命令返回此日志:

    0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'start' ]
2 info using npm@2.11.3
3 info using node@v0.12.7
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart react-surveyman@0.0.1
6 info start react-surveyman@0.0.1
7 verbose unsafe-perm in lifecycle true
8 info react-surveyman@0.0.1 Failed to exec start script
9 verbose stack Error: react-surveyman@0.0.1 start: `./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --colors --port 8090`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\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 react-surveyman@0.0.1
11 verbose cwd C:\Users\Dev\react-surveyman
12 error Windows_NT 6.3.9600
13 error argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
14 error node v0.12.7
15 error npm  v2.11.3
16 error code ELIFECYCLE
17 error react-surveyman@0.0.1 start: `./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --colors --port 8090`
17 error Exit status 1
18 error Failed at the react-surveyman@0.0.1 start script './node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --colors --port 8090'.
18 error This is most likely a problem with the react-surveyman package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --colors --port 8090
18 error You can get their info via:
18 error     npm owner ls react-surveyman
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

我将 npm@2.11.3 与 node@v0.12.7 一起使用, 有什么建议吗? 谢谢,

【问题讨论】:

    标签: node.js npm reactjs


    【解决方案1】:

    问题已解决,问题是因为我在 Windows 上并且节点脚本对 Windows 不友好。通过从“./node_modules/webpack-dev-server/bin/webpack-dev-server”中删除“./” .js --progress --colors --port 8090",

    【讨论】:

      猜你喜欢
      • 2018-10-23
      • 1970-01-01
      • 1970-01-01
      • 2017-09-22
      • 1970-01-01
      • 2017-11-12
      • 2019-12-19
      • 2019-02-17
      • 1970-01-01
      相关资源
      最近更新 更多