2015-05-31 140 views
0

我想将cordova插件添加到我的项目中。直到昨天,我成功地做到了。但突然间我无法从本地系统添加插件。它给了我以下错误。无法添加科尔多瓦插件

$ cordova plugin add C:\Users\ankur\CoolPlugin Fetching plugin "C:UsersankurCoolPlugin" via npm npm http GET https://registry.npmjs.org/C%3AUsersankurCoolPlugin npm http 404 https://registry.npmjs.org/C%3AUsersankurCoolPlugin Fetching from npm failed: 404 Not Found: C%3AUsersankurCoolPlugin Error: 404 Not Found: C%3AUsersankurCoolPlugin at RegClient. (c:\Users\ankur\AppData\Roaming\npm\node_modules\co rdova\node_modules\cordova-lib\node_modules\npm\node_modules\npm-registry-client \lib\request.js:268:14) at Request.self.callback (c:\Users\ankur\AppData\Roaming\npm\node_modules\co rdova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:140 8:22) at Request.emit (events.js:110:17) at Request. (c:\Users\ankur\AppData\Roaming\npm\node_modules\cord ova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:876: 14) at Request.emit (events.js:129:20) at IncomingMessage. (c:\Users\ankur\AppData\Roaming\npm\node_modu les\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index .js:827:12) at IncomingMessage.emit (events.js:129:20) at _stream_readable.js:908:16 at process._tickCallback (node.js:355:11)

我不能弄清楚为什么它抛出一个错误,“错误:404未找到:C%3AUsersankurCoolPlugin”当我运行科尔多瓦的插件添加C:\用户\ ANKUR \ CoolPlugin。令人惊讶的是,我能够成功地从github添加一个插件。

非常感谢。

回答

0

您必须指定包含plugin.xml文件的文件夹的本地路径。

如果仍然失败,你可以尝试上传你的插件,并从那里拉它。

+1

谢谢阿布舍克。我刚发现我必须把本地路径放在引号中。 –