'ng' is not recognized as an internal or external command, operable program or batch file.
Bug Report or Feature Request (mark with an x)
i have installed angular cli
C:\prashant>npm install -g @angular/cli C:\Users\prashant-mishra\AppData\Roaming\npm\ng -> C:\Users\prashant-mishra\AppD ata\Roaming\npm\node_modules@angular\cli\bin\ng C:\Users\prashant-mishra\AppData\Roaming\npm `-- @angular/[email protected]
npm WARN optional Skipping failed optional dependency /@angular/cli/chokidar/fse vents: npm WARN notsup Not compatible with your operating system or architecture: fseve [email protected]
- [ ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
window 7, npm : 3.10.3, node: v6.5.0
The log given by the failure.
Desired functionality.
ng command is not working
Mention any other details that might be useful.
did you read the prerequisites?
Both the CLI and generated project have dependencies that require Node 6.9.0 or higher,
Yes i have upgraded after posting it... the problem was same.
C:\Users\prashant-mishra>node -v v6.11.1
More over ng command is not recognized into any other directive except the npm directive... Even i have added the npm directive path into my The Environment path variable
C:\Projects\practice>npm install -g @angular/cli
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules@angular\cli\node_modules
chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"dar
win","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\
npm-cli.js" "install" "-g" "@angular/cli"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! path C:\Users\prashant-mishra\AppData\Roaming\npm\node_modules@angular\cli
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\prashant-mishra\AppData\Roaming\npm\nod e_modules@angular\cli' -> 'C:\Users\prashant-mishra\AppData\Roaming\npm\[email protected] TE'
I would suggest to go to 'C:\Users\prashant-mishra\AppData\Roaming\npm\node_modules' folder and manually delete angular cli. You most likely have to execute as an administrator, if I read your error correctly (EPERM).
These two are warnings and shouldn't affect the install:
npm WARN optional Skipping failed optional dependency /@angular/cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
You seem to be having some problem with npm installs. Perhaps try reinstalling Node/Npm and look at their issue tracker.
To the best of our knowledge the Angular CLI packages are correctly published.
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.