Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic Build Produces: Cannot find Module 'Q' #484

Closed
ksr583 opened this issue Jun 15, 2015 · 4 comments
Closed

Ionic Build Produces: Cannot find Module 'Q' #484

ksr583 opened this issue Jun 15, 2015 · 4 comments

Comments

@ksr583
Copy link

ksr583 commented Jun 15, 2015

Getting this error after doing just the basic "getting started" instructions:

Running command: "/Volumes/Storage Drive/Projects/ionic-app/hooks/after_prepare/010_add_platform_class.js" "/Volumes/Storage Drive/Projects/ionic-app"
add to body class: platform-ios
Running command: "/Volumes/Storage Drive/Projects/ionic-app/platforms/ios/cordova/build"
module.js:338
    throw err;
          ^
Error: Cannot find module 'Q'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Volumes/Storage Drive/Projects/ionic-app/platforms/ios/cordova/lib/check_reqs.js:25:13)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
ERROR building one of the platforms: Error: /Volumes/Storage Drive/Projects/ionic-app/platforms/ios/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Volumes/Storage Drive/Projects/ionic-app/platforms/ios/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

System Information:

Cordova CLI: 5.1.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.0.0
Ionic CLI Version: 1.5.2
Ionic App Lib Version: 0.2.0
ios-deploy version: 1.7.0
ios-sim version: 3.1.1
OS: Mac OS X Yosemite
Node Version: v0.12.4
Xcode version: Xcode 6.3.2 Build version 6D2105

@ksr583
Copy link
Author

ksr583 commented Jun 15, 2015

Solved this by using the solution highlighted here. If your Mac hard drive is not Case-Sensitive then it will work fine, but if it is (as it is by default), this issue has to be fixed manually.

@joshmanders
Copy link

I am working with @ksr583 and helping him with this issue and while the solution was fixed in the code, by the looks of the npm package being 4 months since last publish and the fact that we had to manually edit the node_modules folder for this code, this fix hasn't been published yet and is still in the wild.

@jbavari
Copy link

jbavari commented Jun 30, 2015

Thanks for the update @killswitch

@jbavari jbavari self-assigned this Jun 30, 2015
pedroxs added a commit to pedroxs/cordova-wp8 that referenced this issue Oct 17, 2015
This is giving me errors trying to add wp8 platform on a Linux system. I found similar erros [here](ionic-team/ionic-cli#484) and [here](apache/cordova-ios#132 (comment)).  

Error output:
```
❯ ionic platform add wp8
Updated the hooks directory to have execute permissions
WARNING: Applications for platform wp8 can not be built on this OS - linux.
Adding wp8 project...
module.js:339
    throw err;
    ^

Error: Cannot find module 'Q'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/home/pedroxs/.cordova/lib/npm_cache/cordova-wp8/3.8.1/package/bin/lib/create.js:20:13)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
Error: /home/pedroxs/.cordova/lib/npm_cache/cordova-wp8/3.8.1/package/bin/create: Command failed with exit code 1
    at ChildProcess.whenDone (/home/pedroxs/.nvm/versions/node/v4.2.1/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
```
asfgit pushed a commit to apache/cordova-wp8 that referenced this issue Oct 19, 2015
This is giving me errors trying to add wp8 platform on a Linux system. I found similar erros [here](ionic-team/ionic-cli#484) and [here](apache/cordova-ios#132 (comment))

This closes #88
@jthoms1
Copy link
Member

jthoms1 commented Sep 30, 2016

Thanks for opening the issue. It seems that issue has been resolved. I am going to close this issue but please feel free to reopen another issue if this occurs again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants