Phonegap 3.3.0无法添加任何插件 [英] Phonegap 3.3.0 cannot add any plugin

查看:163
本文介绍了Phonegap 3.3.0无法添加任何插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



正在重现的步骤:

  $ cordova create app de.app.nameapp-name
$ cd app
$ cordova平台添加ios
$ cordova插件add com .phonegap.plugins.barcodescanner

从com.phonegap.plugins.barcodescanner获取插件...
为ios $ b $开始安装com.phonegap.plugins.barcodescanner b处理操作过程中出错!正在尝试还原...

/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
错误:Uh oh!
找不到/path/app/plugins/com.phonegap.plugins.barcodescanner/src/ios/CDVBarcodeScanner.mmios< source-file>
at module.exports.source-file.install(/usr/local/lib/node_modules/cordova/node_modules/plugman/src/platforms/ios.js:44:48)
在Object.ActionStack .process(/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/action-stack.js:46:25)
在handleInstall(/ usr / local / lib / node_modules / cordova / node_modules / plugman / src / install.js:380:20)
在/usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:331:20
在_fulfilled /usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:798:54)
at self.promiseDispatch.done(/ usr / local / lib / node_modules / cordova / node_modules /plugman/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch(/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:760 :13)
at /usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:574:44
at flush(/ usr / local / lib / node_modules / cordova / node_modules / plugman / node_modules / q / q.js:108:17)
at process._tickCallback(node.js:415:13)

如果我使用github链接,我得到相同的错误:

  $ cordova plugin add https://github.com/phonegap-build/BarcodeScanner 
从https://github.com/phonegap-build/BarcodeScanner获取插件...
启动安装ofcom.phonegap.plugins.barcodescannerfor ios
准备ios项目

/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126 $ b $ ;
^
语法错误:意外的令牌

版本的插件:

  $ cordova插件添加https://github.com/wildabeast/BarcodeScanner 



我发现了一个关于问题在phonegap 3.0.0 https://github.com/jonathannaguin/BarcodeScanner 仍然给我相同的错误。



我想importen部分是找不到/path/app/plugins/com.phonegap.plugins.barcodescanner/src/ios/CDVBarcodeScanner .mmios



更新



我有同样的问题与 org.apache.cordova.console 。如果我使用 phonegap本地插件添加...



我注意到 www /config.xml platforms / ios / www / config.xml 已损坏。在文件的末尾有一些可以删除的二进制空白空间。可能有某些与phonegap本身混淆

解决方案

问题是由我目录导致的。如果我做 cd〜



我在 \Volumes / www strong> samba共享通过smbfs安装。


I am trying to add barcodescanner plugin to an Phonegap 3.3.0 project.

Steps to reproduce:

$ cordova create app de.app.name "app-name"
$ cd app
$ cordova platform add ios
$ cordova plugin add com.phonegap.plugins.barcodescanner

Fetching plugin from "com.phonegap.plugins.barcodescanner"...
Starting installation of "com.phonegap.plugins.barcodescanner" for ios
Error during processing of action! Attempting to revert...

/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error: Uh oh!
cannot find "/path/app/plugins/com.phonegap.plugins.barcodescanner/src/ios/CDVBarcodeScanner.mm" ios <source-file>
    at module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/platforms/ios.js:44:48)
    at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/action-stack.js:46:25)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:380:20)
    at /usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:331:20
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:760:13)
    at /usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:574:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:415:13)

If I use the github link I get the same error in short:

$ cordova plugin add https://github.com/phonegap-build/BarcodeScanner
Fetching plugin from "https://github.com/phonegap-build/BarcodeScanner"...
Starting installation of "com.phonegap.plugins.barcodescanner" for ios
Preparing ios project

/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
SyntaxError: Unexpected token

Also I get the same for the original version of the plugin:

$ cordova plugin add https://github.com/wildabeast/BarcodeScanner

I found a thread about a problem in phonegap 3.0.0 but https://github.com/jonathannaguin/BarcodeScanner still gives me the same error.

I guess the importen part is cannot find "/path/app/plugins/com.phonegap.plugins.barcodescanner/src/ios/CDVBarcodeScanner.mm" ios. Any thoughts how I can dig deeper into this and make it work?

Update

I got the same problem with org.apache.cordova.console. Also if I use phonegap local plugin add ....

I notice that www/config.xml and platforms/ios/www/config.xml are broken. There is some binary empty space at the end of the file that can be removed. There might be something messed up with phonegap itself.

解决方案

Problem is caused by the directory I am in. If I do cd ~ and run the same command it just works!

I was in \Volumes/www with is a samba share mounted over smbfs.

这篇关于Phonegap 3.3.0无法添加任何插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆