1

enter image description here I am not able build the angular project in visual studio using ng serve,but I am able to do it using node.js command prompt please give me solutions for this one

3

2 Answers 2

1

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!

Sign up to request clarification or add additional context in comments.

Comments

0

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).

5 Comments

C:\Users\snadarge>$ npm install -g @angular/cli '$' is not recognized as an internal or external command, operable program or batch file. ->I tried but not working
It seems you don’t have node and npm installed on your system. Follow instruction and install them first using below link: blog.teamtreehouse.com/install-node-js-npm-windows
I have already installed it, problem is I am not able to use it CMD, but I can use it in nodeCommand
If you want to use the command in cmd you should add npm bin directory into your windows environment variables. I will put the link of how to do that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.