pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

Pm2 node-gyp error on Mac OSX Installation

Open dipen opened this issue 11 years ago • 2 comments

Bunch of errors while doing node-gyp, here is the full log

npm install -g pm2 npm http GET https://registry.npmjs.org/pm2 npm http 304 https://registry.npmjs.org/pm2 npm http GET https://registry.npmjs.org/chalk npm http GET https://registry.npmjs.org/cli-table/0.3.0 npm http GET https://registry.npmjs.org/chokidar npm http GET https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/commander/2.4.0 npm http GET https://registry.npmjs.org/coffee-script/1.8.0 npm http GET https://registry.npmjs.org/colors/0.6.2 npm http GET https://registry.npmjs.org/eventemitter2/0.4.14 npm http GET https://registry.npmjs.org/json-stringify-safe/5.0.0 npm http GET https://registry.npmjs.org/debug/2.1.0 npm http GET https://registry.npmjs.org/cron/1.0.5 npm http GET https://registry.npmjs.org/nssocket/0.5.1 npm http GET https://registry.npmjs.org/pidusage/0.1.0 npm http GET https://registry.npmjs.org/axm npm http GET https://registry.npmjs.org/pm2-axon-rpc/0.3.6 npm http GET https://registry.npmjs.org/moment npm http GET https://registry.npmjs.org/pm2-axon/2.0.7 npm http GET https://registry.npmjs.org/vizion npm http GET https://registry.npmjs.org/pm2-deploy npm http GET https://registry.npmjs.org/punt/2.2.0 npm http GET https://registry.npmjs.org/pm2-rpc-fallback/3.0.9 npm http GET https://registry.npmjs.org/pm2-multimeter/0.1.2 npm http GET https://registry.npmjs.org/shelljs/0.3.0 npm http GET https://registry.npmjs.org/pm2-logs npm http GET https://registry.npmjs.org/isbinaryfile npm ERR! git fetch -a origin (http://ikt.pm2.io/ikt.git) error: cannot open FETCH_HEAD: Permission denied npm WARN optional dep failed, continuing ikt@git+http://ikt.pm2.io/ikt.git#master npm http 304 https://registry.npmjs.org/async npm http 304 https://registry.npmjs.org/eventemitter2/0.4.14 npm http 304 https://registry.npmjs.org/coffee-script/1.8.0 npm http 304 https://registry.npmjs.org/nssocket/0.5.1 npm http 304 https://registry.npmjs.org/punt/2.2.0 npm http 304 https://registry.npmjs.org/commander/2.4.0 npm http 304 https://registry.npmjs.org/pm2-axon/2.0.7 npm http 304 https://registry.npmjs.org/axm npm http 304 https://registry.npmjs.org/chokidar npm http 304 https://registry.npmjs.org/pm2-multimeter/0.1.2 npm http 304 https://registry.npmjs.org/debug/2.1.0 npm http 304 https://registry.npmjs.org/cli-table/0.3.0 npm http 304 https://registry.npmjs.org/cron/1.0.5 npm http 304 https://registry.npmjs.org/vizion npm http 304 https://registry.npmjs.org/isbinaryfile npm http 304 https://registry.npmjs.org/pm2-logs npm http 304 https://registry.npmjs.org/pm2-rpc-fallback/3.0.9 npm http 304 https://registry.npmjs.org/pm2-axon-rpc/0.3.6 npm http 304 https://registry.npmjs.org/pm2-deploy npm http 304 https://registry.npmjs.org/chalk npm http 304 https://registry.npmjs.org/json-stringify-safe/5.0.0 npm http 304 https://registry.npmjs.org/pidusage/0.1.0 npm http 304 https://registry.npmjs.org/shelljs/0.3.0 npm http 304 https://registry.npmjs.org/colors/0.6.2 npm http 304 https://registry.npmjs.org/moment npm http GET https://registry.npmjs.org/strip-ansi npm http GET https://registry.npmjs.org/has-ansi npm http GET https://registry.npmjs.org/supports-color npm http GET https://registry.npmjs.org/escape-string-regexp npm http GET https://registry.npmjs.org/ansi-styles npm http GET https://registry.npmjs.org/axon/1.0.0 npm http GET https://registry.npmjs.org/commander/1.0.5 npm http GET https://registry.npmjs.org/charm npm http GET https://registry.npmjs.org/readdirp npm http GET https://registry.npmjs.org/fsevents npm http GET https://registry.npmjs.org/async-each npm http GET https://registry.npmjs.org/ms/0.6.2 npm http GET https://registry.npmjs.org/tv4 npm http GET https://registry.npmjs.org/amp-message npm http GET https://registry.npmjs.org/pm2-interface npm http GET https://registry.npmjs.org/blessed/0.0.36 npm http GET https://registry.npmjs.org/lazy npm http GET https://registry.npmjs.org/escape-regexp/0.0.1 npm http GET https://registry.npmjs.org/amp npm http GET https://registry.npmjs.org/configurable/0.0.1 npm http GET https://registry.npmjs.org/debug npm http GET https://registry.npmjs.org/mkdirp npm http 304 https://registry.npmjs.org/ansi-styles npm http 304 https://registry.npmjs.org/escape-string-regexp npm http 304 https://registry.npmjs.org/strip-ansi npm http 304 https://registry.npmjs.org/has-ansi npm http 304 https://registry.npmjs.org/supports-color npm http 304 https://registry.npmjs.org/async-each npm http GET https://registry.npmjs.org/ansi-regex npm http 304 https://registry.npmjs.org/readdirp npm http GET https://registry.npmjs.org/ansi-regex npm http 304 https://registry.npmjs.org/charm npm http 304 https://registry.npmjs.org/ms/0.6.2 npm http 304 https://registry.npmjs.org/fsevents npm http 304 https://registry.npmjs.org/blessed/0.0.36 npm http 304 https://registry.npmjs.org/tv4 npm http GET https://registry.npmjs.org/nan npm http 304 https://registry.npmjs.org/pm2-interface npm http 304 https://registry.npmjs.org/commander/1.0.5 npm http 304 https://registry.npmjs.org/axon/1.0.0 npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/minimatch npm http GET https://registry.npmjs.org/readable-stream npm http 304 https://registry.npmjs.org/escape-regexp/0.0.1 npm http 304 https://registry.npmjs.org/amp-message npm http GET https://registry.npmjs.org/has-color npm http 304 https://registry.npmjs.org/configurable/0.0.1 npm http 304 https://registry.npmjs.org/debug npm http 304 https://registry.npmjs.org/lazy npm http GET https://registry.npmjs.org/axon/2.0.0 npm http GET https://registry.npmjs.org/pm2-axon-rpc npm http GET https://registry.npmjs.org/amp/0.3.1 npm http GET https://registry.npmjs.org/keypress npm http 304 https://registry.npmjs.org/mkdirp npm http 304 https://registry.npmjs.org/amp npm http 304 https://registry.npmjs.org/ansi-regex npm http 304 https://registry.npmjs.org/ansi-regex npm http 304 https://registry.npmjs.org/nan

[email protected] install /usr/local/lib/node_modules/pm2/node_modules/chokidar/node_modules/fsevents node-gyp rebuild

SOLINK_MODULE(target) Release/.node SOLINK_MODULE(target) Release/.node: Finished CXX(target) Release/obj.target/fse/fsevents.o In file included from ../fsevents.cc:6: ../node_modules/nan/nan.h:189:74: error: too many arguments to function call, expected at most 3, have 4 return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv); ~~~~~~~~~~~~~~~~~~ ^~~~ /Users/dipen/.node-gyp/0.11.9/deps/v8/include/v8.h:3585:3: note: 'New' declared here static Local New(Handle receiver = ^ In file included from ../fsevents.cc:6: ../node_modules/nan/nan.h:217:27: error: cannot initialize a parameter of type 'int' with an rvalue of type 'v8::Isolate ' return v8::Array::New(v8::Isolate::GetCurrent()); ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/dipen/.node-gyp/0.11.9/deps/v8/include/v8.h:2335:31: note: passing argument to parameter 'length' here static Local New(int length = 0); ^ In file included from ../fsevents.cc:6: ../node_modules/nan/nan.h:222:54: error: too many arguments to function call, expected at most single argument 'length', have 2 arguments return v8::Array::New(v8::Isolate::GetCurrent(), length); ~~~~~~~~~~~~~~ ^~~~~~ /Users/dipen/.node-gyp/0.11.9/deps/v8/include/v8.h:2335:3: note: 'New' declared here static Local New(int length = 0); ^ In file included from ../fsevents.cc:6: ../node_modules/nan/nan.h:227:53: error: too many arguments to function call, expected single argument 'time', have 2 arguments return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date(); ~~~~~~~~~~~~~ ^~~~ /Users/dipen/.node-gyp/0.11.9/deps/v8/include/v8.h:2866:3: note: 'New' declared here static Local New(double time); ^ In file included from ../fsevents.cc:6: ../node_modules/nan/nan.h:227:70: error: expected '(' for function-style cast or type construction return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date(); ~~~~~~~~^ ../node_modules/nan/nan.h:227:72: error: expected expression return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date(); ^ ../node_modules/nan/nan.h:232:53: error: too many arguments to function call, expected single argument 'time', have 2 arguments return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date(); ~~~~~~~~~~~~~ ^~~~ /Users/dipen/.node-gyp/0.11.9/deps/v8/include/v8.h:2866:3: note: 'New' declared here static Local New(double time); ^ In file included from ../fsevents.cc:6: ../node_modules/nan/nan.h:232:70: error: expected '(' for function-style cast or type construction return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date(); ~~~~~~~~^ ../node_modules/nan/nan.h:232:72: error: expected expression return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date(); ^ ../node_modules/nan/nan.h:235:15: error: no type named 'UnboundScript' in namespace 'v8' typedef v8::UnboundScript NanUnboundScript; ~~~~^ ../node_modules/nan/nan.h:243:9: error: no member named 'ScriptCompiler' in namespace 'v8' v8::ScriptCompiler::Source source(s, origin); ~~~~^ ../node_modules/nan/nan.h:244:16: error: no member named 'ScriptCompiler' in namespace 'v8' return v8::ScriptCompiler::CompileUnbound( ~~~~^ ../node_modules/nan/nan.h:245:37: error: use of undeclared identifier 'source'; did you mean 'v8::Extension::source'? v8::Isolate::GetCurrent(), &source); ^~~~~~ v8::Extension::source /Users/dipen/.node-gyp/0.11.9/deps/v8/include/v8.h:3712:46: note: 'v8::Extension::source' declared here const String::ExternalAsciiStringResource source() const { ^ In file included from ../fsevents.cc:6: ../node_modules/nan/nan.h:245:36: error: must explicitly qualify name of member function when taking its address v8::Isolate::GetCurrent(), &source); ^~~~~~~ Extension:: ../node_modules/nan/nan.h:252:9: error: no member named 'ScriptCompiler' in namespace 'v8' v8::ScriptCompiler::Source source(s); ~~~~^ ../node_modules/nan/nan.h:253:16: error: no member named 'ScriptCompiler' in namespace 'v8' return v8::ScriptCompiler::CompileUnbound( ~~~~^ ../node_modules/nan/nan.h:254:37: error: use of undeclared identifier 'source'; did you mean 'v8::Extension::source'? v8::Isolate::GetCurrent(), &source); ^~~~~~ v8::Extension::source /Users/dipen/.node-gyp/0.11.9/deps/v8/include/v8.h:3712:46: note: 'v8::Extension::source' declared here const String::ExternalAsciiStringResource* source() const { ^ In file included from ../fsevents.cc:6: ../node_modules/nan/nan.h:254:36: error: must explicitly qualify name of member function when taking its address v8::Isolate::GetCurrent(), &source); ^~~~~~~ Extension:: ../node_modules/nan/nan.h:279:36: error: too many arguments to function call, expected single argument 'value', have 2 arguments v8::Isolate::GetCurrent(), val).Asv8::NumberObject(); ^~~ /Users/dipen/.node-gyp/0.11.9/deps/v8/include/v8.h:2904:3: note: 'New' declared here static Local New(double value); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [Release/obj.target/fse/fsevents.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:101:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:827:12) gyp ERR! System Darwin 14.0.0 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/pm2/node_modules/chokidar/node_modules/fsevents gyp ERR! node -v v0.11.9 gyp ERR! node-gyp -v v0.12.1 gyp ERR! not ok npm http 304 https://registry.npmjs.org/readable-stream npm http 304 https://registry.npmjs.org/graceful-fs npm http 304 https://registry.npmjs.org/minimatch npm http 304 https://registry.npmjs.org/has-color npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund npm http GET https://registry.npmjs.org/core-util-is npm http 304 https://registry.npmjs.org/pm2-axon-rpc npm http 304 https://registry.npmjs.org/amp/0.3.1 npm http GET https://registry.npmjs.org/isarray/0.0.1 npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/keypress npm http 304 https://registry.npmjs.org/axon/2.0.0 npm http 304 https://registry.npmjs.org/lru-cache npm http 304 https://registry.npmjs.org/core-util-is npm http 304 https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/isarray/0.0.1 npm http 304 https://registry.npmjs.org/inherits npm WARN optional dep failed, continuing [email protected] /usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2 [email protected] /usr/local/lib/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])

dipen avatar Dec 20 '14 15:12 dipen

Realised I was using bleeding edge node version. Works on node stable. Closing.

dipen avatar Dec 20 '14 16:12 dipen

npm i pm2 -g --no-optional

The --no-optional argument will prevent optional dependencies from being installed.

https://docs.npmjs.com/cli/install

soyuka avatar Dec 20 '14 16:12 soyuka