我需要你的帮助,我在https://github.com/ReuvenLiran/Netomedia有一个反应项目。 它在Linux上运行良好,但在Windows上它会引发错误:
Nettomdeia@0.4.3启动C:\ Users \ user1 \ Documents \ Dev \ Netomedia 更好的npm-run dev-server
running better-npm-run in C:\Users\user1\Documents\Dev\Netomedia
Executing script: dev-server
to be executed: ./node_modules/.bin/webpack-dev-server --hot --inline --config build/webpack.config.js
net.js:641
throw new TypeError('invalid data');
^
TypeError: invalid data
at WriteStream.Socket.write (net.js:641:11)
at ChildProcess.<anonymous> (C:\Users\user1\Documents\Dev\Netomedia\node_modules\better-npm-run\lib\exec.js:32:18)
at emitOne (events.js:77:13)
at ChildProcess.emit (events.js:169:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
at Function.Module.runMain (module.js:443:11)
at startup (node.js:139:18)
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! Nettomdeia@0.4.3 start: `better-npm-run dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Nettomdeia@0.4.3 start script 'better-npm-run dev-server'.
npm ERR! This is most likely a problem with the Nettomdeia package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! better-npm-run dev-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs Nettomdeia
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls Nettomdeia
npm ERR! There is likely additional logging output above.
问题是什么?如何解决?
提前致谢。
答案 0 :(得分:0)
最后我解决了它。我更新了更好的npm-run到最新版本,我的脚本曾经是'./node_module/.bin/webpack-dev-server'而不是'webpack-dev-server'。 Windows使用路径变量。