ng command not found on archlinux
Hello, I am trying to start a MEAN project with Angular Cli, the problem is that bash does not find ng command.
N.B. I installed @angular/cli locally, not globally. Here is my npm list --depth=0 output:
[ubarch@ubarch_725_g2 ~]$ npm list --depth=0 [email protected] /home/ubarch ├── @angular/[email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]

I found ng into the path ~/node_modules/@angular/cli/bin and I can execute it if I call using ./ng, the output is in the following screeshot.

What have I do to make ng usable without invoking it with ./ ?
Angular CLI can either be install globally (npm i -g @angular/cli) or locally on a project (same command but without -g).
In your case you're installing it locally but not on a project. You're just installing it in your user directory. That won't work because your user directory is not really a CLI project.
I recommend that you either do a global install or create a real project to install Angular CLI in. Then you can add a npm script to your package.json that calls it (e.g. "ng": "ng",) and call commands with npm run ng -- args --flags).
That way you get a fully local CLI. But the half local half global approach you're trying is not supported.
Thank you very much for the advice, I didn't know.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.