I just found NPX, this tool lets you install global packages without sudo rights. I want to use it with my angular projects.
I run
dev@b7ee560044f1:~/project$ npx -p @angular/cli ng version
npx: installed 294 in 6.391s
Looks good, it works
But if i retry the same command i will get
dev@b7ee560044f1:~/project$ npx @angular/cli ng version
npx: installed 294 in 4.725s
Why NPX installs angular cli package every time? I thought that downloading package is performed only once and cached somewhere..
I thought that this command would work but it doesn't...
dev@b7ee560044f1:~/project$ npx ng version
npx: installed 1 in 0.98s
command not found: ng
npm i -g @angular/cli
and it'll be accessible in your binary. – Sonpm install @angular/cli
. It will be saved locally so that you can maintain versions between different projects. – Ingravescentnpm i -g
requiresSUDO
rights – Vickynpm install @angular/cli
and runnode_modules/.bin/ng serve
. – Reconcilablenpm i -g thing
docs.npmjs.com/… – Metsky@angular/cli
referenced in the dev dependencies of yourpackage.json
? – Quinnquinol