Windows 8.1
Node: 7.7.1
npm: 3.10.2
ng --versionreturns following result with error on last 5 results:
@angular/cli: 1.0.0-rc.1
node: 7.7.1
os: win32 x64
@angular/compiler: error
@angular/compiler-cli: error
@angular/core: error
@ngtools/json-schema: error
@ngtools/webpack: errorHere is the path from where I executed
ng --versioncommand.
C:\Users\<YourUserName>\AppData\Roaming\npm\node_modules\angular-cli> ng --versionI do not get above output if I run
ng --versioncommand from any other windows path.
The logic to determine whether the current directory is within a CLI project is to check the dependencies within package.json. The CLI thinks it is within a CLI project here so it is trying to find the versions of the dependencies you see there, but they're not found so it shows error.
I'm not too concerned about this, can you please retry from these two locations:
The first should yield just the CLI's version.
The second should yield the CLI's version as well as the other dependencies you see listed above.
Try executing: ng -v
Hope it helps.
Run npm install, fixed it for me.
This worked for me:
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._