gpt4 book ai didi

cordova - npm 错误!注册表错误解析json

转载 作者:行者123 更新时间:2023-12-04 08:07:18 24 4
gpt4 key购买 nike

我正在开发一个小的 Cordova v4.0.0 项目,npm 版本:v0.10.35
我正在添加一些插件,通常,
直到现在,当我尝试添加另一个插件时,它给出了一个错误:

cordova plugin add org.apache.cordova.NetworkManager
Fetching plugin "org.apache.cordova.NetworkManager" via plugin registry
npm ERR! registry error parsing json
npm ERR! registry error parsing json
SyntaxError: Unexpected token I
Internal routing error

Sorry, we cannot connect to the intended server.

We have just been notified of this problem. We will correct it as soon as possible.

Feel free to contact us if you have any questions: support at iriscouch.com

at Object.parse (native)
at RegClient.<anonymous> (C:\Users\Tony\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\request.js:274:23)
at C:\Users\Tony\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\request.js:251:7
at Gunzip.onEnd (zlib.js:167:5)
at Gunzip.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:442:13)

为了解决这个问题,我做了:
npm cache clean

我有一些代理,由 spy 软件安装,我卸载了。
我已经清除了 Windows 代理设置和 npm 代理设置:
npm config rm proxy
npm config rm https-proxy

但它仍然不起作用。

2015 年 1 月 12 日更新:
cordova plugin add org.apache.cordova.NetworkManager
Fetching plugin "org.apache.cordova.NetworkManager" via plugin registry
Error: 404 Not Found: org.apache.cordova.NetworkManager
at RegClient.<anonymous> (C:\Users\Tony\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\request.js:304:14)
at Request._callback (C:\Users\Tony\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\request.js:246:65)
at Request.self.callback (C:\Users\Tony\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\request.js:236:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (C:\Users\Tony\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\request.js:1142:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (C:\Users\Tony\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\request.js:1096:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:442:13)

替代解决方案是使用 git:
cordova plugin add https://github.com/apache/cordova-plugin-network-information

.
Fetching plugin "https://github.com/apache/cordova-plugin-network-information" via git clone
Installing "org.apache.cordova.network-information" for android
Installing "org.apache.cordova.network-information" for windows

最佳答案

服务器没有响应。目前,您可以像这样从 GitHub 安装大部分插件:

cordova plugin add https://github.com/apache/cordova-plugin-network-information



或者

cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git



请注意,由于插件之间的依赖性和版本差异,可能会出现副作用,必须逐案解决。让我们希望这不是一个长期问题。

关于cordova - npm 错误!注册表错误解析json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27883023/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com