【发布时间】:2014-03-12 05:03:38
【问题描述】:
我在创建 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
但它不适用于创建命令。我错过了什么吗?
【问题讨论】:
-
npm config set strict-ssl false 应该是解决方案,但我也无法用它创建项目。 @smath8 - 你找到解决方案了吗??
-
@LohithKrishna - 不,我终于在这个链接的帮助下手动创建了项目 - stackoverflow.com/questions/21845056/…
-
嗯,好的,试试这个!谢谢:)