How do I install @angular/cli on debian 10

I've installed Nodejs so far using the following:
https://www.linode.com/docs/development/nodejs/how-to-install-nodejs-and-nginx-on-debian-10/

but now I need to install the angular client.
Ive tried the following line:

npm install -g @angular/cli

but I get the result of:

/root/.nvm/versions/node/v12.16.2/bin/ng -> /root/.nvm/versions/node/v12.16.2/lib/node_modules/@angular/cli/bin/ng

@angular/cli@10.0.4 postinstall /root/.nvm/versions/node/v12.16.2/lib/node_modules/@angular/cli
node ./bin/postinstall/script.js

sh: 1: node: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @angular/cli@10.0.4 postinstall: node ./bin/postinstall/script.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @angular/cli@10.0.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-07-23T08_05_27_223Z-debug.log

can't seem to figure out whats wrong.

1 Reply

Linode Staff

Hey there -

I haven't come across this error myself, but I have done some research on it for you on how to fix this. The first thing that I recommend is checking out the log that the output you pasted above refers you to:

/root/.npm/_logs/2020-07-23T08_05_27_223Z-debug.log

You might be able to find additional information in that log.

There are another couple of options in the Stack Overflow article I found, which I am pasting below:

error: This is probably not a problem with npm. There is likely additional logging output above

Keep in mind that the program they're using in the article is not Angular, but the same principles may apply.

I hope this gets you pointed in the right direction. I'm also adding some tags to this post so that other members of the Linode Community who may have run into this themselves will be able to see it and offer their input if they can.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct