Ich arbeite an einem kleinen Cordova v4.0.0 Projekt, npm Version: v0.10.35 Ich habe einige Plugins hinzugefügt, normalerweise bis jetzt, wenn ich versuche, ein anderes Plugin hinzuzufügen, gibt es einen Fehler:npm ERR! registry error parsing json
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)
In meinem Versuch, dieses Problem zu lösen, ich habe:
npm cache clean
ich einen Proxy-Server hatte, durch eine Spyware installiert, dass ich deinstalliert. ich bereits Fenster Proxy-Einstellungen gelöscht und npm Proxy-Einstellungen:
npm config rm proxy
npm config rm https-proxy
Aber es Stills funktioniert nicht.
Aktualisierung am 12. Jan. 2015:
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)
Alternative Lösung ist git zu verwenden:
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
Obwohl, wenn Sie ein Werkzeug wie CCA (https://github.com/MobileChromeApps/mobile-chrome-apps) verwenden, können Sie stecken bleiben, nicht in der Lage sein, neue Projekte zu erstellen (wie es entfernt und vorhandene Plugins dann neu installiert sie von fern). –
Jetzt gibt es einen weiteren Fehler, ein Fehler 404: Fehler: 404 nicht gefunden: org.apache.cordova.NetworkManager – Tony