创建cordova项目时,我收到了CERT_UNTRUSTED错误
C:\>cordova create kapsel_workspace com.example.myApp MyApp
Creating a new cordova project with name "MyApp" and id "com.example.myApp" at l
ocation "C:\kapsel_workspace"
Downloading cordova library for www...
Error: CERT_UNTRUSTED
at SecurePair.<anonymous> (tls.js:1350:32)
at SecurePair.EventEmitter.emit (events.js:92:17)
at SecurePair.maybeInitFinished (tls.js:963:10)
at CleartextStream.read [as _read] (tls.js:463:15)
at CleartextStream.Readable.read (_stream_readable.js:320:10)
at EncryptedStream.write [as _write] (tls.js:366:25)
at doWrite (_stream_writable.js:219:10)
at writeOrBuffer (_stream_writable.js:209:5)
at EncryptedStream.Writable.write (_stream_writable.js:180:11)
at write (_stream_readable.js:573:24)
我已经设置了npm的代理,我在安装cordova时遇到了同样的错误,我使用了以下命令并且它已经工作了
C:\>npm config set strict-ssl false
但它不适用于create命令。我错过了什么吗?
答案 0 :(得分:0)
对不起,7年后我有了答案。运行他们在您的帖子中提到的行后,
npm config set strict-ssl false
我下载了最新版本的 NodeJS,之后我在创建新的cordova 项目时不再遇到问题。
我希望这个答案能帮助你和其他人......