You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on a Node.js project and encountered issues while trying to install the necessary packages using npm install. During the installation process, I received multiple deprecation warnings for certain packages, indicating that they are no longer maintained or should be upgraded. Additionally, the installation fails with an error related to the x509 package, which appears to involve node-gyp and compilation issues.
Environment:
Node Version: 22.12.0
npm Version: 10.2.0
OS: macOS Darwin 21.5.0
Note:
It works well with Node.js 16 by using the command export CXXFLAGS="--std=c++17" && npm install, but it doesn't function properly with later versions
Error npm error path /Users/rohail/Documents/Github/node-version-to-20/node_modules/x509 npm error command failed npm error command sh -c node-gyp rebuild npm error CXX(target) Release/obj.target/x509/src/addon.o npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.2.0 npm error gyp info using node@22.12.0 | darwin | x64 npm error gyp info find Python using Python version 3.10.5 found at "/Library/Frameworks/Python.framework/Versions/3.10/bin/python3" npm error gyp info spawn /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 npm error gyp info spawn args [ npm error gyp info spawn args '/Users/rohail/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm error gyp info spawn args 'binding.gyp', npm error gyp info spawn args '-f', npm error gyp info spawn args 'make', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/rohail/Documents/Github/node-version-to-20/node_modules/x509/build/config.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/rohail/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/common.gypi', npm error gyp info spawn args '-Dlibrary=shared_library', npm error gyp info spawn args '-Dvisibility=default', npm error gyp info spawn args '-Dnode_root_dir=/Users/rohail/Library/Caches/node-gyp/22.12.0', npm error gyp info spawn args '-Dnode_gyp_dir=/Users/rohail/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp', npm error gyp info spawn args '-Dnode_lib_file=/Users/rohail/Library/Caches/node-gyp/22.12.0/<(target_arch)/node.lib', npm error gyp info spawn args '-Dmodule_root_dir=/Users/rohail/Documents/Github/node-version-to-20/node_modules/x509', npm error gyp info spawn args '-Dnode_engine=v8', npm error gyp info spawn args '--depth=.', npm error gyp info spawn args '--no-parallel', npm error gyp info spawn args '--generator-output', npm error gyp info spawn args 'build', npm error gyp info spawn args '-Goutput_dir=.' npm error gyp info spawn args ] npm error gyp info spawn make npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm error In file included from ../src/addon.cc:5: npm error In file included from ../include/x509.h:7: npm error In file included from ../node_modules/nan/nan.h:174: npm error ../node_modules/nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8' npm error typedef v8::Local<v8::AccessorSignature> Sig; npm error ~~~~^ npm error In file included from ../src/addon.cc:5: npm error In file included from ../include/x509.h:7: npm error ../node_modules/nan/nan.h:2536:8: error: no matching member function for call to 'SetAccessor' npm error tpl->SetAccessor( npm error ~~~~~^~~~~~~~~~~ npm error /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8-template.h:1055:8: note: candidate function not viable: no known conversion from 'v8::AccessControl' to 'v8::PropertyAttribute' for 5th argument npm error void SetAccessor( npm error ^ npm error /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8-template.h:1049:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'v8::AccessorGetterCallback' (aka 'void (*)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') for 2nd argument npm error void SetAccessor( npm error ^ npm error In file included from ../src/addon.cc:5: npm error In file included from ../include/x509.h:7: npm error In file included from ../node_modules/nan/nan.h:2884: npm error ../node_modules/nan/nan_typedarray_contents.h:34:43: error: no member named 'GetContents' in 'v8::ArrayBuffer' npm error data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset; npm error ~~~~~~~~^ npm error In file included from ../src/addon.cc:4: npm error In file included from ../include/addon.h:4: npm error In file included from /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/node.h:73: npm error In file included from /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8.h:24: npm error In file included from /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8-array-buffer.h:12: npm error /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8-local-handle.h:269:5: error: static_assert failed due to requirement 'std::is_base_of<v8::Value, v8::Data>::value' "type check" npm error static_assert(std::is_base_of<T, S>::value, "type check"); npm error ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm error ../node_modules/nan/nan_callbacks_12_inl.h:175:20: note: in instantiation of function template specialization 'v8::Local<v8::Value>::Local<v8::Data>' requested here npm error cbinfo(info, obj->GetInternalField(kDataIndex)); npm error ^ npm error 4 errors generated. npm error make: *** [Release/obj.target/x509/src/addon.o] Error 1 npm error gyp ERR! build error npm error gyp ERR! stack Error:makefailed with exit code: 2 npm error gyp ERR! stack at ChildProcess.<anonymous> (/Users/rohail-invozone/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23) npm error gyp ERR! System Darwin 21.5.0 npm error gyp ERR! command "/Users/rohail/.nvm/versions/node/v22.12.0/bin/node" "/Users/rohail-invozone/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm error gyp ERR! cwd /Users/rohail-invozone/Documents/Github/node-version-to-20/node_modules/x509 npm error gyp ERR! node -v v22.12.0 npm error gyp ERR! node-gyp -v v10.2.0 npm error gyp ERR! not ok
The text was updated successfully, but these errors were encountered:
I am currently working on a Node.js project and encountered issues while trying to install the necessary packages using npm install. During the installation process, I received multiple deprecation warnings for certain packages, indicating that they are no longer maintained or should be upgraded. Additionally, the installation fails with an error related to the x509 package, which appears to involve node-gyp and compilation issues.
Environment:
Note:
It works well with Node.js 16 by using the command export CXXFLAGS="--std=c++17" && npm install, but it doesn't function properly with later versions
Error
npm error path /Users/rohail/Documents/Github/node-version-to-20/node_modules/x509 npm error command failed npm error command sh -c node-gyp rebuild npm error CXX(target) Release/obj.target/x509/src/addon.o npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.2.0 npm error gyp info using node@22.12.0 | darwin | x64 npm error gyp info find Python using Python version 3.10.5 found at "/Library/Frameworks/Python.framework/Versions/3.10/bin/python3" npm error gyp info spawn /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 npm error gyp info spawn args [ npm error gyp info spawn args '/Users/rohail/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm error gyp info spawn args 'binding.gyp', npm error gyp info spawn args '-f', npm error gyp info spawn args 'make', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/rohail/Documents/Github/node-version-to-20/node_modules/x509/build/config.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/rohail/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/common.gypi', npm error gyp info spawn args '-Dlibrary=shared_library', npm error gyp info spawn args '-Dvisibility=default', npm error gyp info spawn args '-Dnode_root_dir=/Users/rohail/Library/Caches/node-gyp/22.12.0', npm error gyp info spawn args '-Dnode_gyp_dir=/Users/rohail/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp', npm error gyp info spawn args '-Dnode_lib_file=/Users/rohail/Library/Caches/node-gyp/22.12.0/<(target_arch)/node.lib', npm error gyp info spawn args '-Dmodule_root_dir=/Users/rohail/Documents/Github/node-version-to-20/node_modules/x509', npm error gyp info spawn args '-Dnode_engine=v8', npm error gyp info spawn args '--depth=.', npm error gyp info spawn args '--no-parallel', npm error gyp info spawn args '--generator-output', npm error gyp info spawn args 'build', npm error gyp info spawn args '-Goutput_dir=.' npm error gyp info spawn args ] npm error gyp info spawn make npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm error In file included from ../src/addon.cc:5: npm error In file included from ../include/x509.h:7: npm error In file included from ../node_modules/nan/nan.h:174: npm error ../node_modules/nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8' npm error typedef v8::Local<v8::AccessorSignature> Sig; npm error ~~~~^ npm error In file included from ../src/addon.cc:5: npm error In file included from ../include/x509.h:7: npm error ../node_modules/nan/nan.h:2536:8: error: no matching member function for call to 'SetAccessor' npm error tpl->SetAccessor( npm error ~~~~~^~~~~~~~~~~ npm error /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8-template.h:1055:8: note: candidate function not viable: no known conversion from 'v8::AccessControl' to 'v8::PropertyAttribute' for 5th argument npm error void SetAccessor( npm error ^ npm error /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8-template.h:1049:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'v8::AccessorGetterCallback' (aka 'void (*)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') for 2nd argument npm error void SetAccessor( npm error ^ npm error In file included from ../src/addon.cc:5: npm error In file included from ../include/x509.h:7: npm error In file included from ../node_modules/nan/nan.h:2884: npm error ../node_modules/nan/nan_typedarray_contents.h:34:43: error: no member named 'GetContents' in 'v8::ArrayBuffer' npm error data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset; npm error ~~~~~~~~^ npm error In file included from ../src/addon.cc:4: npm error In file included from ../include/addon.h:4: npm error In file included from /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/node.h:73: npm error In file included from /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8.h:24: npm error In file included from /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8-array-buffer.h:12: npm error /Users/rohail/Library/Caches/node-gyp/22.12.0/include/node/v8-local-handle.h:269:5: error: static_assert failed due to requirement 'std::is_base_of<v8::Value, v8::Data>::value' "type check" npm error static_assert(std::is_base_of<T, S>::value, "type check"); npm error ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm error ../node_modules/nan/nan_callbacks_12_inl.h:175:20: note: in instantiation of function template specialization 'v8::Local<v8::Value>::Local<v8::Data>' requested here npm error cbinfo(info, obj->GetInternalField(kDataIndex)); npm error ^ npm error 4 errors generated. npm error make: *** [Release/obj.target/x509/src/addon.o] Error 1 npm error gyp ERR! build error npm error gyp ERR! stack Error:
makefailed with exit code: 2 npm error gyp ERR! stack at ChildProcess.<anonymous> (/Users/rohail-invozone/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23) npm error gyp ERR! System Darwin 21.5.0 npm error gyp ERR! command "/Users/rohail/.nvm/versions/node/v22.12.0/bin/node" "/Users/rohail-invozone/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm error gyp ERR! cwd /Users/rohail-invozone/Documents/Github/node-version-to-20/node_modules/x509 npm error gyp ERR! node -v v22.12.0 npm error gyp ERR! node-gyp -v v10.2.0 npm error gyp ERR! not ok
The text was updated successfully, but these errors were encountered: