0

The code does not matter in my file i always get this code at the terminal and i dont know how fix it.

This is the code i get in the terminal.

ng : The term 'ng' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • ng serve
  • ~~
    • CategoryInfo : ObjectNotFound: (ng:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

I tried to run some different commands on PowerShell but nothing seemed to fix it.

Harry
  • 1
  • 1
  • Either you do not have ng installed (my be running with older version of PS) or ng is not on your PSModulePath environmental variable. – jdweng Jan 09 '23 at 09:45
  • 1
    Does it happen if you just start ```powershell.exe``` (or ```pwsh.exe```) without a script path? If so, try it again with ```powershell.exe -noprofile```. If that fixes it you've got a problem in your profile script - run this to see all the locations that profile scripts have been loaded from... ```write-host $profile``` – mclayton Jan 09 '23 at 09:46
  • @jdweng i was trying a lot of things in the enviromental variable and edited the path and the text does not come up any more. but now it appears a new message and the message is this: The environment variable 'Path' seems to have some paths containing the '"' character. The existence of such a character is known to have caused the Python extension to not load. If the extension fails to load please modify your paths to remove this '"' character. – Harry Jan 09 '23 at 11:05
  • Best way of editing environmental is to click on start button and type : Edit Environmental Variables for your account. Check both the system and user. Powershell uses PSModulePath. – jdweng Jan 09 '23 at 12:34
  • @jdweng ok thanks for the reply. I found the PSModulePath in systemvariables not in the enviromental variables i dont't know if im supposed to see it in the enviromental variables and how do i know what should be as the value sorry if it's dumb questions. – Harry Jan 09 '23 at 14:47
  • User path variables are added to System variables or override System variables. The System variables can only be changed by an admin. This way users can make changes without being an admin. – jdweng Jan 09 '23 at 15:38
  • @jdweng ok thanks for the good info. But one thing i dont get is how i can make this message disappear and why is it even there. Thanks for all the help tho. This is the message i get when i open vs code: The environment variable 'Path' seems to have some paths containing the '"' character. The existence of such a character is known to have caused the Python extension to not load. If the extension fails to load please modify your paths to remove this '"' character. – Harry Jan 09 '23 at 19:53
  • See https://stackoverflow.com/questions/50989592/vs-code-python-extension-recently-started-complaining-about-a-path-error-on-win1#:~:text=The%20environment%20variable%20'Path'%20seems,paths%20to%20remove%20these%20characters. – jdweng Jan 09 '23 at 20:44

0 Answers0