V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ansheng
V2EX  ›  Node.js

npm 异常 Error: write EINVAL

  •  
  •   ansheng · 2016-11-20 12:17:47 +08:00 · 3456 次点击
    这是一个创建于 2954 天前的主题,其中的信息可能已经有所发展或是发生改变。
    D:\WebStormProjects\July>npm run dev
    
    > [email protected] dev D:\WebStormProjects\July
    > node build/dev-server.js
    
    events.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:\WebStormProjects\July\build\check-versions.js:6:6)
        at Object.<anonymous> (D:\WebStormProjects\July\build\check-versions.js:17:21)
    
    npm ERR! Windows_NT 10.0.14393
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
    npm ERR! node v7.1.0
    npm ERR! npm  v3.10.9
    npm ERR! code ELIFECYCLE
    npm ERR! [email protected] dev: `node build/dev-server.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] 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.js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs july
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls july
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     D:\WebStormProjects\July\npm-debug.log
    
    D:\WebStormProjects\July>
    

    不知道这是什么鬼,使用npm install [name] --save-dev的时候也是报错,但是在git bash下就不会报错了。

    2 条回复    2016-11-24 08:37:08 +08:00
    benpichu
        1
    benpichu  
       2016-11-23 19:52:29 +08:00   ❤️ 1
    [这是 node v7.1.0 中的已知 bug ,请更新至 node v7.2.0 ]
    [参见 https://github.com/nodejs/node/issues/9542 ]
    ansheng
        2
    ansheng  
    OP
       2016-11-24 08:37:08 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2623 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:54 · PVG 18:54 · LAX 02:54 · JFK 05:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.