Johnathon Sullinger
Johnathon Sullinger

Reputation: 7414

Install Angular CLI on Google Cloud Shell

I'm trying to install the @angular/cli npm package inside of the Google Cloud Shell. When I run npm install -g @angular/cli the package manager does through and starts trying to perform the install and then fails with a permissions issue.

Error: EACCES: permission denied, access '/usr/local/nvm/versions/node/v6.9.2/lib/node_modules'

I've tried to run this with sudo npm install -g @angular/cli but the terminal tells me:

NPM: command not found"

I tried to perform the installation to my $HOME instead, using this gist, but accessing the ~/.bashrc file is denied.

What am I supposed to do in order to install global node packages like this?

Upvotes: 1

Views: 1512

Answers (1)

Alexey Alexandrov
Alexey Alexandrov

Reputation: 3129

Try

$ sudo -i npm install -g @angular/cli

Upvotes: 3

Related Questions