2016-09-25 5 views
1

Ich brauche deine Hilfe, ich habe ein Reaktionsprojekt in https://github.com/ReuvenLiran/Netomedia. Es funktioniert auf Linux, aber unter Windows wirft er einen Fehler:Webpack-dev-Server wirft einen Fehler unter Windows

[email protected] start C:\Users\user1\Documents\Dev\Netomedia better-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! [email protected] start: `better-npm-run dev-server` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] 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. 

Was ist das Problem und wie kann ich es lösen?

Vielen Dank im Voraus.

+0

Möglicherweise zusammenhängendes Problem? Es sieht zwar schon geschlossen aus. https://github.com/erikras/react-redux-universal-hot-example/issues/947 – Aelexe

+0

Danke, ich habe versucht, besser-npm-run zu verbessern, aber es hat nicht geholfen. –

Antwort

0

Endlich habe ich es gelöst. Ich habe besser-npm-run auf die neueste Version aktualisiert und meine Skripte waren "./node_module/.bin/webpack-dev-server" anstelle von "webpack-dev-server". Windows verwendet Pfadvariablen.