yeoman / generator-karma

Yeoman generator for Karma
http://yeoman.io
BSD 2-Clause "Simplified" License
172 stars 48 forks source link

"Could not open package.json for reading" when running the generator #80

Closed ahmehri closed 8 years ago

ahmehri commented 9 years ago

An error occurred when running the generator:

selection_020

The log output is the following:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
2 info using npm@2.11.3
3 info using node@v0.12.7
4 verbose readDependencies loading dependencies from /home/ahmehri/sandbox-old/karma-sandbox/package.json
5 error install Couldn't read dependencies
6 verbose stack Error: ENOENT, open '/home/ahmehri/sandbox-old/karma-sandbox/package.json'
6 verbose stack     at Error (native)
7 verbose cwd /home/ahmehri/sandbox-old/karma-sandbox
8 error Linux 3.2.0-4-amd64
9 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
10 error node v0.12.7
11 error npm  v2.11.3
12 error path /home/ahmehri/sandbox-old/karma-sandbox/package.json
13 error code ENOPACKAGEJSON
14 error errno -2
15 error package.json ENOENT, open '/home/ahmehri/sandbox-old/karma-sandbox/package.json'
15 error package.json This is most likely not a problem with npm itself.
15 error package.json npm can't find a package.json file in your current directory.
16 verbose exit [ -2, true ]
SBoudrias commented 9 years ago

What's the content of the package.json?

ahmehri commented 9 years ago

There is no generated package.json file, it's supposed to be generated after running the yeoman generator.

eddiemonge commented 8 years ago

This is actually the expected behavior. This will only update the package.json if it exists. It will not create one for you.