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

Error after selecting modules #2

Open
maximilienborne opened this issue Mar 16, 2014 · 21 comments
Open

Error after selecting modules #2

maximilienborne opened this issue Mar 16, 2014 · 21 comments

Comments

@maximilienborne
Copy link

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

@hartman
Copy link

hartman commented Mar 19, 2014

Same here...

@TolotraRam
Copy link

here too, think it doesn't support windows path

@krimple
Copy link

krimple commented Mar 23, 2014

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

@mcanever
Copy link

mcanever commented Apr 3, 2014

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

@ValentinCreative
Copy link

Hi,
same issue on Mavericks

@keshavos
Copy link

Still having the same issue on windows.

@fergalmoran
Copy link

Same here on linux.
Shame - this looks like a really nice project.

@funklos
Copy link

funklos commented May 28, 2014

same issue here

@evandertino
Copy link

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

@bmwertman
Copy link

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)

@skashi
Copy link

skashi commented Jun 5, 2014

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!

@rfryca
Copy link

rfryca commented Jun 9, 2014

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)

@mablay
Copy link

mablay commented Jul 11, 2014

Thanks rfryca, that solved it for me.
The default path for mac users is:

/usr/local/lib/node_modules/generator-angular-cordova

@ghost
Copy link

ghost commented Oct 10, 2014

@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.

@CaptainChainsaw
Copy link

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'

@WillForan
Copy link

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

@liltof
Copy link

liltof commented Feb 15, 2015

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

@marcussaad
Copy link

@liltof, right on. For anyone who is facing this issue, please follow the steps given by him, which are (For Debian based Unix):

  1. rm -rf /usr/lib/node_modules/generator-angular-cordova
  2. cd /usr/lib/node_modules/ && git clone https://github.com/wangshijun/generator-angular-cordova.git && cd $_
  3. npm install

Warning: sudo usage is on you.

@walkingriver
Copy link

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.

  1. npm -g uninstall generator-angular-cordova
  2. mkdir ~/projects/node
  3. git clone https://github.com/wangshijun/generator-angular-cordova.git && cd $_
  4. npm link
  5. mkdir ~/projects/my-new-project && cd $_
  6. yo angular-cordova

It ends up asking some questions about dependencies on my machine, but I don't always see them, so the generator appears to hang.

@ttbarnes
Copy link

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.

@ttbarnes
Copy link

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.

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