Friday 2 June 2017

Installing @angular/cli from npm on Ubuntu Server

I have an Ubuntu instance on AWS, I'm using forge to setup the server. I have installed the packages nodejs and npm. To solve the problem of installing global packages on Ubuntu I have followed the second solution mentioned in this tutorial, https://docs.npmjs.com/getting-started/fixing-npm-permissions

Now when I try to install using this command,

npm install -g @angular/cli

I get the following error,

forge@frontend-staging:~/frontend/current$ npm install -g @angular/cli

▐ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ WARN engine @angular/cli@1.1.0: wanted: {"node":">= 6.9.0","npm":">= 3.0.0"} (current: {"node":"4.2.6","npm":"3.5.2"}) loadDep:node-sass → heade ▌ ╢███████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ loadDep:node-sass → resol ▄ ╢███████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ loadDep:node-sass → mapTo ▀ ╢███████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ loadDep:node-sass → after ▐ ╢███████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ loadDep:@ngtools/json-sch ▄ ╢████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ loadDep:yargs → 200 ▌ ╢█████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ /home/forge/.npm-global/bin/ng -> /home/forge/.npm-global/lib/node_modules/@angular/cli/bin/ng

node-sass@4.5.3 install /home/forge/.npm-global/lib/node_modules/@angular/cli/node_modules/node-sass node scripts/install.js

sh: 1: node: not found npm WARN install:node-sass@4.5.3 node-sass@4.5.3 install: node scripts/install.js npm WARN install:node-sass@4.5.3 spawn ENOENT /home/forge/.npm-global/lib └─┬ @angular/cli@1.1.0 └── UNMET OPTIONAL DEPENDENCY node-sass@^4.3.0

npm WARN optional Skipping failed optional dependency /@angular/cli/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.1



via user2280167

No comments:

Post a Comment