Aside from the solutions suggested in the links which are posted in the comments, you can also try the below command to update the PATH,
set PATH=%PATH%;C:\Users\YOUR_USER_NAME_OR_LOGIN\AppData\Roaming\npm;
Once executed, try re-running your ng serve
command again.
Hope this helps!
Install Angular cli globally using this command.
$ npm install -g @angular/cli
the -g
switch installs angular cli(or any npm package globally on your system).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.