Learner
Learner

Reputation: 544

Getting error when trying to install pm2

I am trying to install pm2 on my MAC OS version 10.8.5. But when i am intstalling it.

I have installed XCODE 5.1.1 on my MAC. but Even after doing that i am getting the gyp ERR! stack Error: not found: make".IS not it that GNU make comes with XCODE and was supposed to work ideally.

Please see below whole ERROR when trying to install it.

Rajeshs-MacBook-Pro:~ rajesh$ npm install pm2

> [email protected] install /Users/rajesh/node_modules/pm2/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
-

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.



gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at F (/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack     at E (/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack     at /Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack     at Object.oncomplete (evalmachine.:93:15)
gyp ERR! System Darwin 12.5.0
gyp ERR! command "node" "/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rajesh/node_modules/pm2/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v0.11.14
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules/pm2
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected])

Upvotes: 1

Views: 3534

Answers (3)

yPhil
yPhil

Reputation: 8367

In your package.json

"optionalDependencies": {
  "fsevents": "*"
}

Then do

npm i -f pm2

No more errors ; You can verify that with npm list

Upvotes: 0

vtokmak
vtokmak

Reputation: 1506

As @mscdex stated "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." means try open the XCode and accept the user agreement. I have similar issue while updating bower dependencies. I accepted new agreements, then it solved.

Upvotes: 2

mscdex
mscdex

Reputation: 106696

It seems like you need to open up Xcode and accept the user agreement first.

Secondly, while you have xcode open, you'll have to make sure you also install the command line tools: go to Preferences -> Downloads and then install Command Line Tools.

Upvotes: 3

Related Questions