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

Unable to npm install dependencies (N64 error) #1074

Open
canIchangethispls opened this issue Jul 29, 2022 · 4 comments
Open

Unable to npm install dependencies (N64 error) #1074

canIchangethispls opened this issue Jul 29, 2022 · 4 comments

Comments

@canIchangethispls
Copy link

canIchangethispls commented Jul 29, 2022

I've installed all required tools (GCC, python, etc.)

Still receiving the following error:

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.10.4 found at "/usr/bin/python3.10"
gyp http GET https://nodejs.org/download/release/v18.7.0/node-v18.7.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v18.7.0/node-v18.7.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v18.7.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v18.7.0/SHASUMS256.txt
gyp info spawn /usr/bin/python3.10
gyp info spawn args [
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   '/root/backend/back-end-main/node_modules/n64/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/.cache/node-gyp/18.7.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/.cache/node-gyp/18.7.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/.cache/node-gyp/18.7.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/root/backend/back-end-main/node_modules/n64',
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 info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/root/backend/back-end-main/node_modules/n64/build'
  CXX(target) Release/obj.target/n64/src/n64.o
In file included from ../src/n64.cc:7:
../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
../../nan/nan.h:2536:19: warning: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::Local<v8::AccessorSignature>, v8::SideEffectType, v8::SideEffectType)’ is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
 2536 |   tpl->SetAccessor(
      |   ~~~~~~~~~~~~~~~~^
 2537 |       name
      |       ~~~~         
 2538 |     , getter_
      |     ~~~~~~~~~      
 2539 |     , setter_
      |     ~~~~~~~~~      
 2540 |     , obj
      |     ~~~~~          
 2541 |     , settings
      |     ~~~~~~~~~~     
 2542 |     , attribute
      |     ~~~~~~~~~~~    
 2543 |     , signature);
      |     ~~~~~~~~~~~~   
In file included from /root/.cache/node-gyp/18.7.0/include/node/v8-function.h:15,
                 from /root/.cache/node-gyp/18.7.0/include/node/v8.h:33,
                 from /root/.cache/node-gyp/18.7.0/include/node/node.h:73,
                 from ../src/n64.cc:6:
/root/.cache/node-gyp/18.7.0/include/node/v8-template.h:838:8: note: declared here
  838 |   void SetAccessor(
      |        ^~~~~~~~~~~
In file included from ../../nan/nan.h:2884,
                 from ../src/n64.cc:7:
../../nan/nan_typedarray_contents.h: In constructor ‘Nan::TypedArrayContents<T>::TypedArrayContents(v8::Local<v8::Value>)’:
../../nan/nan_typedarray_contents.h:34:43: error: ‘class v8::ArrayBuffer’ has no member named ‘GetContents’
   34 |       data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
      |                                           ^~~~~~~~~~~
../src/n64.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE N64::ToString(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/n64.cc:1126:15: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
 1126 |         fmt = "%" PRIo64;
      |               ^
../src/n64.cc:1129:15: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
 1129 |         fmt = "%" PRIu64;
      |               ^
../src/n64.cc:1132:15: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
 1132 |         fmt = "%" PRIx64;
      |               ^
make: *** [n64.target.mk:131: Release/obj.target/n64/src/n64.o] Error 1
make: Leaving directory '/root/backend/back-end-main/node_modules/n64/build'
gyp ERR! build error 

It seems like an arbitrary build error to me.. I've tried different python versions but to no avail.

@canIchangethispls
Copy link
Author

canIchangethispls commented Jul 29, 2022

(Not) Solved by #1046 (comment)

@pinheadmz
Copy link
Member

see my comment here: #1046 (comment)

executing npm install in bcoin is incorrect usage, the node_modules are committed and all you need to run is npm rebuild. Can you clean the repo and try that?

@priyansh2003
Copy link

Is the issue closed by updating the docs from npm install to npm rebuild?

@r0ushann
Copy link

r0ushann commented Feb 9, 2023

try running npm cache clean then npm rebuild

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

4 participants