如何安装cordova?

时间:2016-11-17 19:56:28

标签: cordova

我安装了这样的cordova:

C:\Windows\system32>npm install -g cordova

我得到了结束:

C:\Users\cyril\AppData\Roaming\npm\cordova -> C:\Users\cyril\AppData\Roaming\npm\node_modules\cordova\bin\cordova
C:\Users\cyril\AppData\Roaming\npm
`-- cordova@6.4.0

为了测试我运行的安装并得到它:

C:\Windows\system32>cordova --version
C:\Users\cyril\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:126
                    throw e;
                    ^

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 WriteStream.stream.write (C:\Users\cyril\AppData\Roaming\npm\node_modules\cordova\node_modules\ansi\lib\newlines.js:36:21)
    at MuteStream.ondata (stream.js:31:26)
    at emitOne (events.js:96:13)

你能帮我吗?

1 个答案:

答案 0 :(得分:0)

我通过卸载节点7.10.0并重新安装以前的版本(6.10.3)

解决了这个问题