Cordova 4.3.0 - build命令返回错误无法找到模块'Q' [英] Cordova 4.3.0 - build command returns error Cannot find module 'Q'

查看:749
本文介绍了Cordova 4.3.0 - build命令返回错误无法找到模块'Q'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将cordova更新到版本4.3.0后,执行以下命令:

  cordova build 

会返回以下错误:

  js:340 
throw err;
^
错误:无法在Function.Module._resolveFilename(module.js:338:15)中找到模块'Q'

在Function.Module._load :280:25)
at Module.require(module.js:364:17)
at require(module.js:380:17)
at Object。< anonymous> (/Volumes/CaseSensitive/ios_projects/_Tests/testGruntCordova/testGruntCordova/platforms/ios/cordova/lib/check_reqs.js:25:13)
at Module._compile(module.js:456:26)
在Object.Module._extensions..js(module.js:474:10)
在Module.load(module.js:356:32)
在Function.Module._load :312:12)
在Module.require(module.js:364:17)
构建平台之一的错误:错误:/ Volumes / CaseSensitive / ios_projects / _Tests / testGruntCordova / testGruntCordova / platforms / ios / cordova / build:命令失败,退出代码8
您可能没有构建此项目所需的环境或操作系统
错误:/ Volumes / CaseSensitive / ios_projects / _Tests / testGruntCordova / testGruntCordova / platforms / ios / cordova / build:命令失败,退出代码8
在ChildProcess.whenDone(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.EventEmitter.emit(events.js:98:17)
at maybeClose(child_process.js:753:16)
在Process.ChildProcess._handle.onexit(child_process.js :820:5)



我已经尝试删除和添加平台ios,但没有任何更改。 / p>

我试图运行:

  sudo npm install -g cordova / sudo npm install cordova 
sudo npm install -g Q / sudo npm install Q

没有任何变化。



有任何帮助吗?
非常感谢

解决方案

有一个错误,我已经发布了一个补丁:



Apache Cordova ios - Git存储库


After updating cordova to version 4.3.0 the command:

cordova build

returns the following error:

    module.js:340
    throw err;
          ^
Error: Cannot find module 'Q'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Volumes/CaseSensitive/ios_projects/_Tests/testGruntCordova/testGruntCordova/platforms/ios/cordova/lib/check_reqs.js:25:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
ERROR building one of the platforms: Error: /Volumes/CaseSensitive/ios_projects/_Tests/testGruntCordova/testGruntCordova/platforms/ios/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /Volumes/CaseSensitive/ios_projects/_Tests/testGruntCordova/testGruntCordova/platforms/ios/cordova/build: Command failed with exit code 8
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:753:16)
    at Process.ChildProcess._handle.onexit (child_process.js:820:5)

I have already tried to remove and add the platform ios but nothing changes.

I have tried to run:

sudo npm install -g cordova / sudo npm install cordova
sudo npm install -g Q / sudo npm install Q

but nothing changes.

Any help? Thank you very much

解决方案

There was a bug and I have released a patch to it:

Apache Cordova ios - Git Repository

这篇关于Cordova 4.3.0 - build命令返回错误无法找到模块'Q'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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