问题描述
D:WebStormProjectsJuly>npm run dev> july@1.0.0 dev D:WebStormProjectsJuly> node build/dev-server.jsevents.js:160 throw er; // Unhandled ’error’ event ^Error: write EINVAL at exports._errnoException (util.js:1022:11) at WriteStream.Socket._writeGeneric (net.js:715:26) at WriteStream.Socket._write (net.js:734:8) at doWrite (_stream_writable.js:334:12) at writeOrBuffer (_stream_writable.js:320:5) at WriteStream.Writable.write (_stream_writable.js:247:11) at WriteStream.Socket.write (net.js:661:40) at Object.execSync (child_process.js:526:20) at exec (D:WebStormProjectsJulybuildcheck-versions.js:6:6) at Object.<anonymous> (D:WebStormProjectsJulybuildcheck-versions.js:17:21)npm ERR! Windows_NT 10.0.14393npm ERR! argv 'C:Program Filesnodejsnode.exe' 'C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js' 'run' 'dev'npm ERR! node v7.1.0npm ERR! npm v3.10.9npm ERR! code ELIFECYCLEnpm ERR! july@1.0.0 dev: `node build/dev-server.js`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the july@1.0.0 dev script ’node build/dev-server.js’.npm ERR! Make sure you have the latest version of node.js and npm installed.npm ERR! If you do, this is most likely a problem with the july package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR! node build/dev-server.jsnpm ERR! You can get information on how to open an issue for this project with:npm ERR! npm bugs julynpm ERR! Or if that isn’t available, you can get their info via:npm ERR! npm owner ls julynpm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:npm ERR! D:WebStormProjectsJulynpm-debug.logD:WebStormProjectsJuly>
不知道这是什么鬼,使用npm install [name] --save-dev的时候也是报错,但是在git bash下就不会报错了。
问题解答
回答1:windows的cmd窗口是没有git bash好用的。。。If you do, this is most likely a problem with the july package,npm ERR! not with npm itself.它也说了很可能是你的包的原因,不是npm的原因