question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular ng command not recognized Error

See original GitHub issue

General Information

  • Usage
  • Development
  • Documentation
  • Feature Request

Specific generator

  • Addons
  • HandlebarsJS
  • Angular Element

What Version you are running?

  • NodeJS: 10.16
  • NPM: 6.13
  • @pnp/spfx: 1.10.2 Getting an error that: ‘ng’ is not recognised as an internal or external command. While creating webpart. But I checked in the same terminal ng --version screenshot as below image After creating Webpart it throws an error that above mentioned ng is not recognised command screenshot below image

image

But if I rerun yo @pnp/spfx it not creating angular element.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
fussionlabcommented, Jan 13, 2020

@fussionlab Can you please check certain things for me on your machine, please?

Check 1: In PowerShell/CMD:

where ng

The output should be something link this:

C:\Users\stfB\AppData\Roaming\npm\ng
C:\Users\stfB\AppData\Roaming\npm\ng.cmd

Check 2: Location of Yo:

where yo

The output should be something like this:

C:\Users\stfB\AppData\Roaming\npm\ng
C:\Users\stfB\AppData\Roaming\npm\ng.cmd

Check 3: Overall installed packages of CLI and generator

npm ls -g @angular/cli @pnp/generator-spfx

The output should be something like this:

C:\Users\stfB\AppData\Roaming\npm
+-- @angular/cli@8.3.22
`-- @pnp/generator-spfx@1.10.2

Thank you very much.

I just deleted everything and reinstalled. it’s well and well installed all pack. image but now the issue is #218 #222 param-case do exist in path image

Let me try some possible way to override this issue.

1reaction
fussionlabcommented, Jan 13, 2020

@fussionlab Great - thank you very much for the update. I will look into it as well. It’s a pretty strange issue in this case.

@StfBauer this was caused due to npm conflict. Now it’s fine so far, then Fixed the #222 Error. it quite running well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng is not recognized as an internal or external command
Look up the path for file ng.cmd. Update the environment variable PATH value with the same path path. Restart the command line console...
Read more >
'ng' is not recognized as an internal or external command
To solve the error "ng is not recognized as an internal or external command, operable program or batch file", install the angular cli...
Read more >
How To Solve ng Is Not Recognized As An Internal Or ...
For this solution, you just need to follow a few important operations. Go to the control panel and select the system and security...
Read more >
How to fix "ng command not found" error for node.js @angular ...
Why is the ng command not found? · Angular is not installed on your machine · NPM is not linked with Angular CLI...
Read more >
How To Fix "ng Is Not Recognized As An Internal Or External ...
First search ng.cmd file on your System. · usually at : E:\Users\\AppData\Roaming\npm · Set PATH · check CMD To “ng version” on New...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found