Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-gyp build error #1187

Closed
abishekrsrikaanth opened this issue May 2, 2017 · 19 comments
Closed

node-gyp build error #1187

abishekrsrikaanth opened this issue May 2, 2017 · 19 comments

Comments

@abishekrsrikaanth
Copy link

abishekrsrikaanth commented May 2, 2017

I get the following error every time I run my build, could someone advice what might be wrong and how to fix it?

My node versions

npm -v
4.2.0

node -v
v7.9.0
Error: /usr/local/Cellar/node/7.9.0/bin/node exited with code 1
Output:

> [email protected] install /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/canvas
> node-gyp rebuild

  SOLINK_MODULE(target) Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/Canvas.o
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
  CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
  CXX(target) Release/obj.target/canvas/src/color.o
  CXX(target) Release/obj.target/canvas/src/Image.o
  CXX(target) Release/obj.target/canvas/src/ImageData.o
  CXX(target) Release/obj.target/canvas/src/init.o
  CXX(target) Release/obj.target/canvas/src/FontFace.o
  SOLINK_MODULE(target) Release/canvas.node

> [email protected] install /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/contextify
> node-gyp rebuild

  CXX(target) Release/obj.target/contextify/src/contextify.o

Error output:
../src/contextify.cc:131:56: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
        Local<Object> wrapper = Nan::New(constructor)->NewInstance();
                                                       ^
/Users/abisheksrikaanth/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:3648:52: note: 'NewInstance' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
                                                   ^
../src/contextify.cc:150:16: error: no member named 'SetAccessCheckCallbacks' in 'v8::ObjectTemplate'
        otmpl->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
        ~~~~~  ^
../src/contextify.cc:182:51: warning: 'GetRealNamedProperty' is deprecated [-Wdeprecated-declarations]
        Local<Value> rv = Nan::New(ctx->sandbox)->GetRealNamedProperty(property);
                                                  ^
/Users/abisheksrikaanth/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:3220:30: note: 'GetRealNamedProperty' has been explicitly marked deprecated here
                Local<Value> GetRealNamedProperty(Local<String> key));
                             ^
../src/contextify.cc:209:38: warning: 'GetRealNamedProperty' is deprecated [-Wdeprecated-declarations]
        if (!Nan::New(ctx->sandbox)->GetRealNamedProperty(property).IsEmpty() ||
                                     ^
/Users/abisheksrikaanth/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:3220:30: note: 'GetRealNamedProperty' has been explicitly marked deprecated here
                Local<Value> GetRealNamedProperty(Local<String> key));
                             ^
../src/contextify.cc:210:42: warning: 'GetRealNamedProperty' is deprecated [-Wdeprecated-declarations]
            !Nan::New(ctx->proxyGlobal)->GetRealNamedProperty(property).IsEmpty()) {
                                         ^
/Users/abisheksrikaanth/.electron-gyp/.node-gyp/iojs-1.6.8/deps/v8/include/v8.h:3220:30: note: 'GetRealNamedProperty' has been explicitly marked deprecated here
                Local<Value> GetRealNamedProperty(Local<String> key));
                             ^
4 warnings and 1 error generated.
make: *** [Release/obj.target/contextify/src/contextify.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:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.5.0
gyp ERR! command "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/contextify
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "rebuild" "contextify" "canvas"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/abisheksrikaanth/.npm/_logs/2017-05-02T05_50_00_625Z-debug.log

    at ChildProcess.childProcess.once.code (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder-util/src/util.ts:134:14)
    at Object.onceWrapper (events.js:293:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at Pipe._handle.close [as _onclose] (net.js:510:12)
From previous event:
    at spawn (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder-util/src/util.ts:97:3)
    at /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/src/yarn.ts:118:11
From previous event:
    at rebuild (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/out/yarn.js:87:22)
    at /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/src/yarn.ts:16:11
    at Generator.next (<anonymous>)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at installOrRebuild (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/out/yarn.js:33:21)
    at /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/src/packager.ts:305:13
    at Generator.next (<anonymous>)
From previous event:
    at Packager.installAppDependencies (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/out/packager.js:403:11)
    at /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/src/packager.ts:168:20
    at Generator.next (<anonymous>)
From previous event:
    at Packager.doBuild (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/out/packager.js:299:11)
    at /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/src/packager.ts:143:38
    at Generator.next (<anonymous>)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at Packager.build (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/out/packager.js:251:11)
    at /Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/src/builder.ts:214:40
    at Generator.next (<anonymous>)
From previous event:
    at build (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/out/builder.js:63:21)
    at Object.<anonymous> (/Users/abisheksrikaanth/Viralstyle-Web-Projects/viralstyle+/node_modules/electron-builder/out/cli/build-cli.js:68:41)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
    at bootstrap_node.js:538:3

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! [email protected] build: `npm run pack && build`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the [email protected] build script 'npm run pack && build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the viralstyle-plus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run pack && build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs viralstyle-plus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls viralstyle-plus
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/abisheksrikaanth/.npm/_logs/2017-05-02T05_50_00_688Z-debug.lo
@bnoordhuis
Copy link
Member

The contextify readme says this: "YOU DON'T NEED THIS MODULE ON NODE >= 0.12"

As to the build error itself, .electron-gyp/.node-gyp/iojs-1.6.8 in the file paths suggests it's picking up old headers. Remove the .electron-gyp directory and see what happens.

@abishekrsrikaanth
Copy link
Author

No Luck. Still the same issue even after removing the .electron-gyp folder

@bnoordhuis
Copy link
Member

Are you still having this issue? If yes, can you post the current output you get when building?

@ricardoSa84
Copy link

ricardoSa84 commented May 17, 2017

Hi, i think this is related, if not just ignore.

make: *** [Release/obj.target/erbium/src/erbium.o] Error 1
make: Leaving directory /home/user/nodeTest/node_modules/node-erbium/build' gyp ERR! build error gyp ERR! stack Error: make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.13.0-62-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/nodeTest/node_modules/node-erbium
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm ERR! Linux 3.13.0-62-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "node-erbium"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-erbium package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-erbium
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-erbium
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/user/nodeTest/npm-debug.log

@gibfahn
Copy link
Member

gibfahn commented May 17, 2017

Hi, i think this is related, if not just ignore.

@ricardoSa84 looks like an issue with node-erbium. npm i node-erbium works on Node 0.10 but nothing afterwards. The module hasn't been updated since 2014 so I suspect you might be out of luck.

FYI if you raise issues in two different repos about the same problem it's good practice to link between them. 1248/node-erbium#1

@ricardoSa84
Copy link

@gibfahn Sorry, noobie error.
Always learning.

Thought it was because of this module. Saw that that one was really old but as the error had this related in building and saw this build error thought it might be the same.

Tanks

@refack
Copy link
Contributor

refack commented May 18, 2017

@abishekrsrikaanth Have you had any progress with this issue? Do you have any new information to share?

@liuwensa
Copy link

liuwensa commented Jun 9, 2017

I get the similar error, could someone can help me?thank you

npm install threads_a_gogo
> [email protected] install /var/www/node_modules/threads_a_gogo
> node-gyp -v rebuild

gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli   '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   '-v',
gyp verb cli   'rebuild' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.9\n"
gyp verb get node dir no --target version specified, falling back to host node version: 7.6.0
gyp verb command install [ '7.6.0' ]
gyp verb install input version string "7.6.0"
gyp verb install installing version: 7.6.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 7.6.0
gyp verb build dir attempting to create "build" dir: /var/www/node_modules/threads_a_gogo/build
gyp verb build dir "build" dir needed to be created? /var/www/node_modules/threads_a_gogo/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /var/www/node_modules/threads_a_gogo/build/config.gypi
gyp verb config.gypi checking for gypi file: /var/www/node_modules/threads_a_gogo/config.gypi
gyp verb common.gypi checking for gypi file: /var/www/node_modules/threads_a_gogo/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/node_modules/threads_a_gogo/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/7.6.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/7.6.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.node-gyp/7.6.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/var/www/node_modules/threads_a_gogo',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /root/.node-gyp/7.6.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/var/www/node_modules/threads_a_gogo/build'
  LD_LIBRARY_PATH=/var/www/node_modules/threads_a_gogo/build/Release/lib.host:/var/www/node_modules/threads_a_gogo/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p src; bash -c "cd /var/www/node_modules/threads_a_gogo/src && node js2c.js"
*** THREADS_A_GOGO: JS2C(kBoot_js): OK
*** THREADS_A_GOGO: JS2C(kPool_js): OK
  touch Release/obj.target/configure.stamp
  g++ '-DNODE_GYP_MODULE_NAME=threads_a_gogo' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/root/.node-gyp/7.6.0/include/node -I/root/.node-gyp/7.6.0/src -I/root/.node-gyp/7.6.0/deps/uv/include -I/root/.node-gyp/7.6.0/deps/v8/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -pedantic -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -O3 -pedantic -MMD -MF ./Release/.deps/Release/obj.target/threads_a_gogo/src/threads_a_gogo.o.d.raw   -c -o Release/obj.target/threads_a_gogo/src/threads_a_gogo.o ../src/threads_a_gogo.cc
../src/threads_a_gogo.cc: In function ‘typeThread* isAThread(v8::Handle<v8::Object>)’:
../src/threads_a_gogo.cc:346:41: error: ‘class v8::Object’ has no member named ‘GetHiddenValue’
     v8::Local<v8::Value> ptr= receiver->GetHiddenValue(v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), "ptr"));
                                         ^
../src/threads_a_gogo.cc:347:54: warning: ‘v8::Local<v8::Number> v8::Value::ToNumber() const’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:9005): Use maybe version [-Wdeprecated-declarations]
     thread= (typeThread*) ((uintptr_t) ptr->ToNumber()->Value());
                                                      ^
../src/threads_a_gogo.cc: In function ‘void eventLoop(typeThread*)’:
../src/threads_a_gogo.cc:520:72: warning: ‘v8::Local<v8::Value> v8::Object::CallAsFunction(v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:3298): Use maybe version [-Wdeprecated-declarations]
   v8::Local<v8::Object> r= script->CallAsFunction(threadObject, 0, NULL)->ToObject();
                                                                        ^
../src/threads_a_gogo.cc:546:18: warning: ‘v8::TryCatch::TryCatch()’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:7616): Use isolate version [-Wdeprecated-declarations]
     v8::TryCatch onError;
                  ^
../src/threads_a_gogo.cc:688:44: warning: ‘v8::Local<v8::Value> v8::Object::CallAsFunction(v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:3298): Use maybe version [-Wdeprecated-declarations]
         dev->CallAsFunction(global, 2, args);
                                            ^
../src/threads_a_gogo.cc:701:46: warning: ‘v8::Local<v8::Value> v8::Object::CallAsFunction(v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:3298): Use maybe version [-Wdeprecated-declarations]
     ntql= dnt->CallAsFunction(global, 0, NULL)->ToNumber()->Value();
                                              ^
../src/threads_a_gogo.cc:701:58: warning: ‘v8::Local<v8::Number> v8::Value::ToNumber() const’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:9005): Use maybe version [-Wdeprecated-declarations]
     ntql= dnt->CallAsFunction(global, 0, NULL)->ToNumber()->Value();
                                                          ^
../src/threads_a_gogo.cc: In function ‘void cleanUpAfterThreadUVCallback(uv_handle_t*)’:
../src/threads_a_gogo.cc:790:101: warning: ‘v8::Local<v8::Value> v8::Object::CallAsFunction(v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:3298): Use maybe version [-Wdeprecated-declarations]
     cb->ToObject()->CallAsFunction(v8::Isolate::GetCurrent()->GetCurrentContext()->Global(), 0, NULL);
                                                                                                     ^
../src/threads_a_gogo.cc: In function ‘void Callback(uv_async_t*)’:
../src/threads_a_gogo.cc:896:16: warning: ‘v8::TryCatch::TryCatch()’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:7616): Use isolate version [-Wdeprecated-declarations]
   v8::TryCatch onError;
                ^
../src/threads_a_gogo.cc:922:63: warning: ‘v8::Local<v8::Value> v8::Object::CallAsFunction(v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:3298): Use maybe version [-Wdeprecated-declarations]
       cb->ToObject()->CallAsFunction(that->ToObject(), 2, args);
                                                               ^
../src/threads_a_gogo.cc:928:37: warning: ‘void node::FatalException(const v8::TryCatch&)’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/node.h:301): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
         node::FatalException(onError);
                                     ^
../src/threads_a_gogo.cc:950:81: warning: ‘v8::Local<v8::Value> v8::Object::CallAsFunction(v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:3298): Use maybe version [-Wdeprecated-declarations]
       cb->ToObject()->CallAsFunction(iso->GetCurrentContext()->Global(), 2, args);
                                                                                 ^
../src/threads_a_gogo.cc: In function ‘void Destroy(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/threads_a_gogo.cc:1132:34: warning: ‘v8::Local<v8::Number> v8::Value::ToNumber() const’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:9005): Use maybe version [-Wdeprecated-declarations]
     nuSigkill= args[0]->ToNumber()->Value() ? kKillRudely : kKillNicely;
                                  ^
../src/threads_a_gogo.cc: In function ‘void Create(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/threads_a_gogo.cc:1425:17: error: ‘class v8::Object’ has no member named ‘SetHiddenValue’
     nodeObject->SetHiddenValue(v8::String::NewFromUtf8(iso, "ptr"), v8::Number::New(iso, (double) ((uintptr_t) thread)));
                 ^
../src/threads_a_gogo.cc:1433:95: warning: ‘v8::Local<v8::Value> v8::Object::CallAsFunction(v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/7.6.0/include/node/v8.h:3298): Use maybe version [-Wdeprecated-declarations]
     thread->nodeDispatchEvents.Reset(iso, boot->ToObject()->CallAsFunction(nodeObject, 0, NULL)->ToObject());
                                                                                               ^
threads_a_gogo.target.mk:107: recipe for target 'Release/obj.target/threads_a_gogo/src/threads_a_gogo.o' failed
make: *** [Release/obj.target/threads_a_gogo/src/threads_a_gogo.o] Error 1
make: Leaving directory '/var/www/node_modules/threads_a_gogo/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:192:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "-v" "rebuild"
gyp ERR! cwd /var/www/node_modules/threads_a_gogo
gyp ERR! node -v v7.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/var/www/package.json'
npm WARN www No description
npm WARN www No repository field.
npm WARN www No README data
npm WARN www No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp -v rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install 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!     /root/.npm/_logs/2017-06-09T08_06_51_237Z-debug.log

@refack
Copy link
Contributor

refack commented Jun 9, 2017

@liuwensa this could be a problem with thread_a_gogo.
Could you try to run npm i buffertools (which is a heavily used native addon, that is known to work on most platforms).
Also make sure you have gcc >= 4.8.5

@sakshi094
Copy link

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.

@refack
Copy link
Contributor

refack commented Jul 7, 2017

@sakshi094 This is a bug in npm@5 that it doesn't respect optionalDependencies. contextify isn't needed for recent versions of node.
Try to run npm i --no-optional.

@gnanaprakash
Copy link

@refack --no-optional did not helped

@sakshi094
Copy link

downgrading version of node helped
something like following
brew install [email protected]
Also remember, that you can install more than 1 node package at the same, but you cannot have them available at the same time. So if you have the latest/generic node package already installed you need to unlink it first:

brew unlink node
And then you can link a different version:

brew link [email protected]

@bnoordhuis
Copy link
Member

@sakshi094 Not a good idea. Node.js v0.12 is unmaintained and has known security vulnerabilities.

@sakshi094
Copy link

ohh .. thn .. what is supposed to be done @bnoordhuis ? do u have any good idea .. ?

@bnoordhuis
Copy link
Member

Depends on what issue you ran into. npm bug? Try downgrading to the latest npm@4.

If a module fails to build, it's possible it hasn't been updated for newer versions of node.js (ex. threads_a_gogo, mentioned above.)

You are probably better off not using it (because it's unlikely to be maintained) than downgrading node.

@sakshi094
Copy link

Okay .. @bnoordhuis thanks for the info .. will try it this way .. let me see if i get anything new and revert back with new queries.

@alatras
Copy link

alatras commented Dec 3, 2018

Same issue here:

 yarn start
  yarn run v1.12.3
  $ ts-node ./src/engine/server/server
  Error: Cannot find module 'contextify'
     at Function.Module._resolveFilename (module.js:469:15)
     at Function.Module._load (module.js:417:25)
     at Module.require (module.js:497:17)
     at require (internal/module.js:20:19)
     at Object.<anonymous> 
  (/Users/aa/Documents/nodeApp/node_modules/jsdom/lib/jsdom/browser/index.js:5:21)
     at Module._compile (module.js:570:32)
     at Object.Module._extensions..js (module.js:579:10)
     at Module.load (module.js:487:32)
     at tryModuleLoad (module.js:446:12)
     at Function.Module._load (module.js:438:3)
  error Command failed with exit code 1.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Anybody?

@mud5545
Copy link

mud5545 commented Apr 30, 2019

I am facing this issue when I try to run docker-compose up test on a release image.
Screen Shot 2019-04-29 at 10 25 19 PM
Please help! I have a project due and don't what I am doing wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants