Git bash ng command not found

Questions : Git bash can not run any ng command (Angular CLI)

2022-10-15T10:34:10+00:00 2022-10-15T10:34:10+00:00

929

I'm working on git bash cmd. When I try run anycodings_bash ng command e.g. ng serve or ng gc anycodings_bash new-component I see this output:

C:\Users\user\AppData\Roaming\npm/node_modules/node/bin/node: anycodings_bash line 1: This: command not found

In the middle of output I see problem with anycodings_bash left and right slash. How can I fix it?

I suppose, it isn't problem with environment anycodings_bash paths, because all ng commands are working anycodings_bash in Windows cmd or PowerShell.

Total Answers 1

33

Answers 1 : of Git bash can not run any ng command (Angular CLI)

Please see comments from @steveswork anycodings_bash at: anycodings_bash https://github.com/nodejs/node/issues/29287

You have to delete anycodings_bash C:/Users/user/AppData/Roaming/npm and anycodings_bash C:/Users/user/AppData/Roaming/npm-cache anycodings_bash and reinstall global npm modules.

(This typically happens after an upgrade anycodings_bash or downgrade of node)

Good Luck.

0

2022-10-15T10:34:10+00:00 2022-10-15T10:34:10+00:00Answer Link

mRahman

Top

  • © 2022 ANYCODINGS.COM - All Rights Reserved.
  • About Us
  • Contact Us
  • DMCA
  • Privacy Policy
  • Disclaimer
  • Terms & Conditions

Why is NG not working?

If you get the error "ng cannot be loaded because running scripts is disabled on this system", open your PowerShell as an administrator and set its execution policy with the Set-ExecutionPolicy command. Copied! Make sure to open your PowerShell as an administrator before you run the Set-ExecutionPolicy command.

How do I know if NG cli is installed?

To Check Angular CLI version use ng --version or ng v or npm list -global --depth 0 commands. ng --version command returns the details of version of Angular CLI installed and in addition to that version of Angular development packages like @angular-devkit/architect,rxjs etc.. as shown below.

Where can I find Ng?

ng binary is located inside of bin/ (or in the folder specified at the next line).

What is the NG command?

The ng new command creates an Angular workspace folder and generates a new application skeleton. A workspace can contain multiple applications and libraries. The initial application created by the ng new command is at the top level of the workspace.