angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng command no found

Open hmuschett opened this issue 10 years ago • 11 comments

Please provide us with the following information:

  1. OS? Windows 7, 8
  2. Versions. Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here: node -6.2.1

Installed angular-cli globally using (npm install -g angular-cli) but when I'm trying to create project using ng new my-project it is throwing error (ng: command not found) and try --help and some say


Thanks! We'll be in touch soon.

hmuschett avatar Aug 29 '16 20:08 hmuschett

Same here

alexverdaguer avatar Aug 29 '16 23:08 alexverdaguer

Freshly installed globally, ng --version gives me

➜  npm install -g angular-cli

[ ... ]
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng
[ ... ]

➜  ng --version

angular-cli: 1.0.0-beta.10
node: 6.4.0
os: darwin x64

catull avatar Aug 30 '16 07:08 catull

hi @catull how to chenge de path in windows??

hmuschett avatar Aug 30 '16 13:08 hmuschett

You do not change anything, the line above ist just to show that npm install creates a symbolic link. I am afraid I cannot advise you with a Windows installation of nodeJS and npm.

catull avatar Aug 30 '16 16:08 catull

ng --sersion nir ng --help nither work for me and at /usr/local/lib/node_modules i have all pakages of angular-cli i do not know work the CLI

hmuschett avatar Aug 30 '16 18:08 hmuschett

Installing node 6.5 resolved this for me.

clifntx avatar Aug 31 '16 06:08 clifntx

@SeekingMonkey i install node 6.5 nothing and nothing remains the same errror not ng command not found

hmuschett avatar Aug 31 '16 18:08 hmuschett

This seems to be roughly the same issue as https://github.com/angular/angular-cli/issues/1930. Basically, the solution is to uninstall node and reinstall 6.5.

It seems due to a node/npm problem.

filipesilva avatar Sep 21 '16 00:09 filipesilva

I am on Mac OSX Sierra and I installed Node using the installer on the site because I thought that brew was giving me the issues -- turns out ng isn't installing with either method.

Aymons-MacBook-Air:MyProjects aymon$ npm list -g --depth=0
/Users/aymon/.npm-packages/lib
├── [email protected]
├── [email protected]
└── [email protected]

Aymons-MacBook-Air:MyProjects aymon$ npm -v
3.10.9
Aymons-MacBook-Air:MyProjects aymon$ node --version
v6.9.2
Aymons-MacBook-Air:MyProjects aymon$ ng
-bash: ng: command not found
Aymons-MacBook-Air:MyProjects aymon$ /usr/local/bin/ng
-bash: /usr/local/bin/ng: No such file or directory

invious avatar Dec 16 '16 18:12 invious

I solved it using ===> export PATH="$PATH:$HOME/npm/bin"

moussazy avatar Jul 16 '17 12:07 moussazy

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.