-
Notifications
You must be signed in to change notification settings - Fork 12k
CLI error when found 'package.json' has no 'devDependencies' entry #5070
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
Comments
@hansl I can see this issue has been closed. But is the code released ? I am trying to install it but still the same error. sudo npm install -g @angular/cli@latest |
Why is it showing a warning even though I have CLI installed globally. Unable to find "@angular/cli" in devDependencies. Please take the following steps to avoid issues: @angular/cli: 1.1.3 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Mac OS X El Capitan
Versions.
1.0.0-rc.0
Repro steps.
Run any cli command in a directory that contains a
package.json
or a subdirectory whose parent contains apackage.json
.The log given by the failure.
/Users/Greg/.nvm/versions/node/v6.10.0/lib/node_modules/@angular/cli/bin/ng:95
const hasOldDevDep = !!packageJsonProject.devDependencies['angular-cli'];
^
TypeError: Cannot read property 'angular-cli' of undefined
at Object. (/Users/Greg/.nvm/versions/node/v6.10.0/lib/node_modules/@angular/cli/bin/ng:95:60)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
Mention any other details that might be useful.
The
package.json
file in question was in my HOME folder (I think Yarn put it there- #4762 pointed me in the right direction) and it only had adependencies
section. Once I added adevDependencies
section the CLI worked properly.The text was updated successfully, but these errors were encountered: