Bug using 'yo angular'
If I follow the instructions at readme.md, after I execute 'yo angular' I can see that a conflict is happening with package.json, and the terminal ask's if I want to overwrite the file or not. If I dont press any key the process continues, but after the message "Done, without errors." i'm not sent back to bash, and if I hit any key, the overwrite message appears again.
+1
same here
+1
If I follow the instructions at readme.md, after I execute 'yo angular' I can see that a conflict is happening with package.json, and the terminal ask's if I want to overwrite the file or not.
That's generally because the package.json file already exists where you're trying to generate it. Are you in a totally empty directory?
Absolutely in a fresh directory. I think perhaps the yeoman generator is creating package.json, then trying to create it a second time.
Yes , in a fresh directory.
Note : this is happening only on windows 8. I installed nodejs using the node installer. On May 6, 2015 3:36 PM, "CaptSaltyJack" [email protected] wrote:
Absolutely in a fresh directory. I think perhaps the yeoman generator is creating package.json, then trying to create it a second time.
— Reply to this email directly or view it on GitHub https://github.com/yeoman/generator-angular/issues/1071#issuecomment-99582379 .
Nope, happening on Mac OS too. :)
Confirmed, I have this issue on Mac
I have the same issue on Ubuntu.
I have the same issue, on Mac (yo --version 1.4.6)
It seams to be related to the installation of karma packages which rewrites the package.json adding devDependencies to the karma packages
I ran the generator twice, once answering Yes and once answering No to "Overwrite package.json?" Here are the differences among the two apps
The rewritten package.json has "grunt-karma", "karma-jasmine",
$ diff norewrite/package.json sandbox/package.json
2c2
< "name": "norewrite",
---
> "name": "sandbox",
22a23
> "grunt-karma": "*",
28a30,31
> "karma-jasmine": "*",
> "karma-phantomjs-launcher": "*",
33a37,39
> },
> "scripts": {
> "test": "grunt test"
35c41
< }
---
> }
here are the corresponding node_modules/ folders
$ ls -gG sandbox/node_modules/
total 0
drwxr-xr-x 11 staff 374 May 9 10:05 grunt
drwxr-xr-x 8 staff 272 May 9 10:05 grunt-autoprefixer
drwxr-xr-x 6 staff 204 May 9 10:05 grunt-concurrent
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-contrib-clean
drwxr-xr-x 6 staff 204 May 9 10:05 grunt-contrib-compass
drwxr-xr-x 6 staff 204 May 9 10:05 grunt-contrib-concat
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-contrib-connect
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-contrib-copy
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-contrib-cssmin
drwxr-xr-x 6 staff 204 May 9 10:05 grunt-contrib-htmlmin
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-contrib-imagemin
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-contrib-jshint
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-contrib-uglify
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-contrib-watch
drwxr-xr-x 6 staff 204 May 9 10:05 grunt-filerev
drwxr-xr-x 6 staff 204 May 9 10:05 grunt-google-cdn
drwxr-xr-x 17 staff 578 May 9 10:07 grunt-karma <------
drwxr-xr-x 14 staff 476 May 9 10:05 grunt-newer
drwxr-xr-x 6 staff 204 May 9 10:05 grunt-ng-annotate
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-svgmin
drwxr-xr-x 7 staff 238 May 9 10:05 grunt-usemin
drwxr-xr-x 9 staff 306 May 9 10:05 grunt-wiredep
drwxr-xr-x 15 staff 510 May 9 10:07 jasmine-core
drwxr-xr-x 8 staff 272 May 9 10:05 jshint-stylish
drwxr-xr-x 16 staff 544 May 9 10:07 karma <---------
drwxr-xr-x 7 staff 238 May 9 10:07 karma-jasmine <----------
drwxr-xr-x 6 staff 204 May 9 10:07 karma-phantomjs-launcher <----------
drwxr-xr-x 6 staff 204 May 9 10:05 load-grunt-tasks
drwxr-xr-x 7 staff 238 May 9 10:05 time-grunt
$ ls -gG norewrite/node_modules/
total 0
drwxr-xr-x 11 staff 374 May 9 10:11 grunt
drwxr-xr-x 8 staff 272 May 9 10:11 grunt-autoprefixer
drwxr-xr-x 6 staff 204 May 9 10:11 grunt-concurrent
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-contrib-clean
drwxr-xr-x 6 staff 204 May 9 10:11 grunt-contrib-compass
drwxr-xr-x 6 staff 204 May 9 10:11 grunt-contrib-concat
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-contrib-connect
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-contrib-copy
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-contrib-cssmin
drwxr-xr-x 6 staff 204 May 9 10:11 grunt-contrib-htmlmin
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-contrib-imagemin
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-contrib-jshint
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-contrib-uglify
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-contrib-watch
drwxr-xr-x 6 staff 204 May 9 10:11 grunt-filerev
drwxr-xr-x 6 staff 204 May 9 10:11 grunt-google-cdn
drwxr-xr-x 14 staff 476 May 9 10:11 grunt-newer
drwxr-xr-x 6 staff 204 May 9 10:11 grunt-ng-annotate
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-svgmin
drwxr-xr-x 7 staff 238 May 9 10:11 grunt-usemin
drwxr-xr-x 9 staff 306 May 9 10:11 grunt-wiredep
drwxr-xr-x 8 staff 272 May 9 10:11 jshint-stylish
drwxr-xr-x 6 staff 204 May 9 10:11 load-grunt-tasks
drwxr-xr-x 7 staff 238 May 9 10:11 time-grunt```
My "solution" to this problem was to install an earlier version of the generator (0.7.1) which worked nicely for me.
What I need to do to install a earlier version?
@murilolobato
First uninstall your current version:
npm uninstall generator-angular
Then install specific version like so:
npm install [email protected]
I am also getting the same issue on Mac
same issue on Ubuntu... But in addition I am also receiving following message:
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
and at the end, following error message:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1011:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)
Same issue on a windows 8 machine...
I was able to confirm this issue. Thanks everybody. Hopefully somebody will have to time to dig into this issue quick.
same issue with 0.11.1, 0.11.0 and 0.10.0 installed version 0.8.0 then had to do bower install and npm install (some errors in generator)
grunt serve is working now
+1
The question is: How to use this generator with this problem? Just press enter until it end? Or the generator is abandoned? @eddiemonge