cordova-plugin-whitelist Error 404 not found

你。 提交于 2019-12-24 03:12:18

问题


I tried to run this code: cordova plugin add cordova-plugin-whitelist but what I keep getting is this:

Fetching plugin "cordova-plugin-whitelist" via plugin registry Error: 404 Not Found: cordova-plugin-whitelist at RegClient.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:304:14) at Request._callback (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65) at Request.self.callback (/usr/local/lib/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> (/usr/local/lib/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> (/usr/local/lib/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:943:16 at process._tickCallback (node.js:419:13)

Any ideas?


回答1:


From an official blog post, Cordova is moving their plugins to npm.

I installed the cordova-plugin-whitelist easily now with npm:

npm install cordova-plugin-whitelist



回答2:


I want to add on an additional answer:

In Visual Studios (VS2015 at least) you can open the config.xml in designer mode (or Shift + F7 to open it) and go to Plugins -> Custom and then give the git repo URL to install a plugin that way to have it be available to the project you're working on.




回答3:


I ran into the same issue today, and basically I needed the plugin, but it isn't maintained on http://registry.cordova.io/cordova-plugin-whitelist

Thankfully, cordova can resolve git repos I just used that instead

cordova plugin add https://github.com/apache/cordova-plugin-whitelist


来源:https://stackoverflow.com/questions/31083504/cordova-plugin-whitelist-error-404-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!