Open maximilienborne opened 10 years ago
Same here...
here too, think it doesn't support windows path
I am trying this on Mac OS X Mavericks, and have cordova, the generator, yeoman, the grunt client, etc, installed. I get a similar error. I am using (and this may be important or not) nvm to install and use my node platforms. I'm on 0.10.26.
[?] Would you like to use Sass (with Compass)? No
[?] Would you like to include Ionic: Yes
[?] Which modules would you like to include? angular-resource.js, angular-cookies.js, angular-sanitize.js
/Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/actions/actions.js:194
throw new Error('Unable to read "' + filepath + '" file (Error code: ' + e
^
Error: Unable to read "/Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/templates/common/index.html" file (Error code: ENOENT).
at Generator.read (/Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/actions/actions.js:194:11)
at Generator.readIndex (/Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/app/index.js:376:39)
at /Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/base.js:341:43
at /Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:551:21
at /Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:227:13
at iterate (/Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:134:13)
at /Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:145:25
at /Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:229:17
at /Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:556:34
at /Users/kenrimple/.nvm/v0.10.26/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/base.js:327:11
Hi, same issue here: [?] Which modules would you like to include? angular-resource.js, angular-cookies.js, angular-sanitize.js
/home/matteo/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/actions/actions.js:194 throw new Error('Unable to read "' + filepath + '" file (Error code: ' + e ^ Error: Unable to read "/home/matteo/local/lib/node_modules/generator-angular-cordova/templates/common/index.html" file (Error code: ENOENT). at Generator.read (/home/matteo/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/actions/actions.js:194:11) at Generator.readIndex (/home/matteo/local/lib/node_modules/generator-angular-cordova/app/index.js:376:39) I'm quite a noob with node but I'll try to find the bug and submit a pull
Hi, same issue on Mavericks
Still having the same issue on windows.
Same here on linux. Shame - this looks like a really nice project.
same issue here
me too, same issue on Ubuntu 14.04
[?] Would you like to use Sass (with Compass)? Yes [?] Would you like to include Ionic: Yes [?] Would you like to use the Sass version of Ionic: Yes [?] Which modules would you like to include? angular-resource.js, angular-cookies.js, angular-sanitize.js
/home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/actions/actions.js:194 throw new Error('Unable to read "' + filepath + '" file (Error code: ' + e ^ Error: Unable to read "/home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/templates/common/index.html" file (Error code: ENOENT). at Generator.read (/home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/actions/actions.js:194:11) at Generator.readIndex (/home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/app/index.js:376:39) at /home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/base.js:341:43 at /home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:551:21 at /home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:227:13 at iterate (/home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:134:13) at /home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:145:25 at /home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:229:17 at /home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:556:34 at /home/bergman/opt/node/node-v0.10.28/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/base.js:327:11
I think this is the same issue I've encountered:
[?] Would you like to copy some sample icons for cordova? Yes Creating cordova app: carRepair
/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:12[?] Would you like to copy some sample icons for cordova? Yes Creating cordova app: carRepair
/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:126 throw e; ^ Error: ENOENT, no such file or directory '/Users/Brad/Documents/car_repair/www/js/index.js' at Object.fs.unlinkSync (fs.js:760:18) at /usr/local/lib/node_modules/generator-angular-cordova/app/index.js:246:16 at _rejected (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:808:24) at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:834:30 at Promise.when (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:1079:31) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:752:41) at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:821:14 at flush (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:108:17) at process._tickCallback (node.js:415:13)6 throw e; ^ Error: ENOENT, no such file or directory '/Users/Brad/Documents/car_repair/www/js/index.js' at Object.fs.unlinkSync (fs.js:760:18) at /usr/local/lib/node_modules/generator-angular-cordova/app/index.js:246:16 at _rejected (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:808:24) at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:834:30 at Promise.when (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:1079:31) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:752:41) at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:821:14 at flush (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:108:17) at process._tickCallback (node.js:415:13)
I'm getting the same issue as everyone else here. I found this post: http://stackoverflow.com/questions/23679910/yeoman-generator-angular-cordova-errors
An answer but no explanation as of yet how it was resolved but maybe that link will open up a think tank on how to fix this error!
npm install -g generator-angular-cordova does not install all necessary files and directories. there is only app folder inside generator-angular-cordova in your node modules global repository folder.
You can clone repository https://github.com/wangshijun/generator-angular-cordova.git into '/Users/529/.nodebrew/node/v0.11.11/lib/node_modules/generator-angular-cordova' or other place where you have your generator-angular-cordova module installed
This will create all necessary files (including templates/common/index.html)
Thanks rfryca, that solved it for me. The default path for mac users is:
/usr/local/lib/node_modules/generator-angular-cordova
@rfryca Works for me too. Just one thing to mention - you'll need to run npm install
after cloning the repo to make sure that the dependencies are all included.
I tried cloning the previously mentioned repo: https://github.com/wangshijun/generator-angular-cordova.git
This is what I get on Ubuntu 14:
Creating cordova app: helloCordova
/usr/local/lib/node_modules/generator-angular-cordova/node_modules/cordova/node_modules/q/q.js:126 throw e; ^ Error: ENOENT, no such file or directory '/usr/local/lib/node_modules/generator-angular-cordova/www/js/index.js'
after npm generator-angular-cordova
I pulled in the template files like
svn co https://github.com/wangshijun/generator-angular-cordova/trunk/templates ~/node_modules/generator-angular-cordova/templates
I've tried this, and it worked (cloning the repo) but now I have another problem : The yo wizard runs twice each time I do "yo angular-cordova", and the second time fails (I imagin that's because the directory is not empty) but if I stop (with ctrl+C) the second run, I don't have anything in the js directory (so no app.js, and no index controller). I've uninstalled and reinstalled yo, cordova, and the generators but have the same results. I'm on ubuntu 14.04 Edit : Ok, solved by removing generator-angular-cordova directory, cloning the repo, cd into it, and npm install. npm install generator-angular-cordova doesn't seem to work at all for me
@liltof, right on. For anyone who is facing this issue, please follow the steps given by him, which are (For Debian based Unix):
rm -rf /usr/lib/node_modules/generator-angular-cordova
cd /usr/lib/node_modules/ && git clone https://github.com/wangshijun/generator-angular-cordova.git && cd $_
npm install
Warning: sudo
usage is on you.
Ok, here is what I did on MacOS 10.10 (Yosemite) to get this to work, and it's similar to what @marcussaad did above. Note that I do not use sudo
, but use the approach John Papa recommends.
It ends up asking some questions about dependencies on my machine, but I don't always see them, so the generator appears to hang.
Same issue here. Since this is a generator, it should generate everything correctly.
You shouldn't have to do any workarounds. This is issue has been open for nearly 1.5 years @wangshijun . Also, out of the only 3 issues ever opened in this repo, they are all pretty much the same issue. You should really attend to these, at least with a reply.
Anyone for the future - use this generator instead:
https://github.com/keshavos/generator-angularjs-cordova
At the time of writing, it works 'out of the box', like a generator should.
I have an error just after the step where i have to choose modules to install :
/usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/actions/actions.js:194 throw new Error('Unable to read "' + filepath + '" file (Error code: ' + e ^ Error: Unable to read "/usr/local/lib/node_modules/generator-angular-cordova/templates/common/index.html" file (Error code: ENOENT). at Generator.read (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/actions/actions.js:194:11) at Generator.readIndex (/usr/local/lib/node_modules/generator-angular-cordova/app/index.js:376:39) at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/base.js:341:43 at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:551:21 at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:227:13 at iterate (/usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:134:13) at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:145:25 at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:229:17 at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/node_modules/async/lib/async.js:556:34 at /usr/local/lib/node_modules/generator-angular-cordova/node_modules/yeoman-generator/lib/base.js:327:11