0

Whenever I enter an ng command prompt like "ng new " it redirects me to the ng.js file in the visual studio code and after I close it up and return back to the cmd, all i see is this:

enter image description here

I was expecting it to create and deploy me a new angular project with all the enviroments and such in VScode, however the action it took upon excuting the command was odd. i have ng as a path in my enviroment variables, so i dont know why this is happpening.

7
  • The ng in your path is not the Angular CLI. Commented Jul 28, 2023 at 9:57
  • 1
    Can you type "where ng"? What does it say, does it point to your angular global installation? Did you install @angular/cli globally (npm install --global @angular/cli) first? Also, perhaps try this: npx -p @angular/cli ng to see what happens? Commented Jul 28, 2023 at 10:34
  • @Zlatko when i type where ng it points to %USERNAME%\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng.js. Commented Jul 28, 2023 at 12:05
  • @Zlatko also when i tried to type “npx -p @angular/cli ng” an error appeared that says “Error: you need to specify a command before moving on. Use ‘—help’ to view the availability commands.” As to the global installation command argument, the execution worked without an error. Commented Jul 28, 2023 at 12:10
  • Then perhaps try npx -p @agular/cli ng new my-app. That might work. Commented Jul 29, 2023 at 16:27

0

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.