sugunan
sugunan

Reputation: 4456

Erron on installing angular on mac

I try to install Angular CLI on mac with following command

sudo npm install -g @angular/cli

The error shown as follows

/usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng

> [email protected] install /usr/local/lib/node_modules/@angular/cli/node_modules/fsevents
> node install

sh: node: command not found

> @angular/[email protected] postinstall /usr/local/lib/node_modules/@angular/cli
> node ./bin/ng-update-message.js

sh: node: command not found
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@angular/cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @angular/[email protected] postinstall: `node ./bin/ng-update-message.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @angular/[email protected] 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!     /Users/sugunan/.npm/_logs/2018-07-08T01_27_53_465Z-debug.log

How to fix the issue?

Upvotes: 1

Views: 390

Answers (1)

sugunan
sugunan

Reputation: 4456

Following command worked

sudo npm install -g @angular/cli --unsafe-perm=true --allow-root

Upvotes: 2

Related Questions