2
votes

I have an Angular project and if I want to start the project with 'ng serve' it is opening the ng file from

C:\Users{user}\AppData\Roaming\npm\node_modules\@angular\cli\bin

Also, I can start the project with 'npm start'.

2
which version you are using? for angular 2+ ng new YourProjectName to create a project and ng serve to run.prady
if you are able to run others commands such as ng new app, ng serve -o should work as well, what version of angular cli are you using ?Joel Wembo
doesn't work any command with ng. The project is from github and I can only run with npm start.Filip Laurentiu
you probably missing npm cliJoel Wembo
'npm' work. 'ng' just open the ng file from that path. It not execute anythingFilip Laurentiu

2 Answers

4
votes

The problem was that I use ng in powershell. In cmd work..

1
votes

Remove path "C:\Users{user}\AppData\Roaming\npm\node_modules@angular\cli\bin" from Environment variable - path. It worked for me.