-
Notifications
You must be signed in to change notification settings - Fork 12k
Cant use NG #5116
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
@dertuerke which version of CLI you are using currently when you added yarn? |
@sumitarora i use yarn 0.21.3. If use use npm i get NO problems |
Same here. It tries to read my package.json that does not have any devDep so it crashes. Here is a line to patch:
File: cli/bin/ng File on my system for reference: |
I am facing to the same issue. Please help. `C:\Users\chathuranga_08290\AppData\Roaming\npm\node_modules@angular\cli\bin\ng:95 TypeError: Cannot read property 'angular-cli' of undefined |
I resolved the issue by doing following things, |
@clrajapaksha the problem comes with YARN. If you use Yarn to install the cli global. |
Fixed with this #5074 |
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 OSX Sierra
Versions.
Node: 7.6.0
Repro steps.
I cant use ng --version, if i use yarn global add.
The log given by the failure.
/Users/burak/.config/yarn/global/node_modules/@angular/cli/bin/ng:95
const hasOldDevDep = !!packageJsonProject.devDependencies['angular-cli'];
^
TypeError: Cannot read property 'angular-cli' of undefined
at Object. (/Users/burak/.config/yarn/global/node_modules/@angular/cli/bin/ng:95:60)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:422:7)
at startup (bootstrap_node.js:143:9)
at bootstrap_node.js:537:3
Mention any other details that might be useful.
The text was updated successfully, but these errors were encountered: