NPM --version引发错误在Windows 7(npm --version throws a

2019-09-26 18:56发布

在Windows 7 64位执行NPM --version,我得到:

net.js:10
const cares = process.binding('cares_wrap');
                      ^

Error: EFILE
    at net.js:10:23
    at NativeModule.compile (bootstrap_node.js:523:7)
    at NativeModule.require (bootstrap_node.js:464:18)
    at createWritableStdioStream (internal/process/stdio.js:155:19)
    at process.getStdout [as stdout] (internal/process/stdio.js:10:14)
    at module.exports (C:\Program Files\nodejs\node_modules\npm\node_modules\npm
log\node_modules\set-blocking\index.js:2:11)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules
\npmlog\log.js:11:1)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
net.js:10
const cares = process.binding('cares_wrap');
                      ^

Error: EFILE
    at net.js:10:23
    at NativeModule.compile (bootstrap_node.js:523:7)
    at NativeModule.require (bootstrap_node.js:464:18)
    at tty.js:4:13
    at NativeModule.compile (bootstrap_node.js:523:7)
    at NativeModule.require (bootstrap_node.js:464:18)
    at createWritableStdioStream (internal/process/stdio.js:142:19)
    at process.getStdout [as stdout] (internal/process/stdio.js:10:14)
    at module.exports (C:\Program Files\nodejs\node_modules\npm\node_modules\npm
log\node_modules\set-blocking\index.js:2:11)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules
\npmlog\log.js:11:1)

愿这是该计算机是一个虚拟机? 在另一方面,--version命令的节点给出一个正确的输出。

文章来源: npm --version throws an error on Windows 7
标签: node.js npm