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

Build failure with node 22.2.0 #230

Open
bnjbvr opened this issue May 25, 2024 · 2 comments
Open

Build failure with node 22.2.0 #230

bnjbvr opened this issue May 25, 2024 · 2 comments

Comments

@bnjbvr
Copy link

bnjbvr commented May 25, 2024

Hi! I'm running into the following build failure with node 22.2.0:

yarn upgrade v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > rc-color-picker@1.2.6" has incorrect peer dependency "react@16.x".
warning " > rc-color-picker@1.2.6" has incorrect peer dependency "react-dom@16.x".
warning "react-select > @emotion/react > @emotion/babel-plugin@11.10.5" has unmet peer dependency "@babel/core@^7.0.0".
warning "react-select > @emotion/react > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0".
[5/5] Rebuilding all packages...
error /Users/benji/code/kresus/node_modules/xml2json/node_modules/node-expat: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /Users/benji/code/kresus/node_modules/xml2json/node_modules/node-expat
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@22.2.0 | darwin | arm64
gyp info find Python using Python version 3.12.3 found at "/opt/homebrew/opt/python@3.12/bin/python3.12"

gyp info spawn /opt/homebrew/opt/python@3.12/bin/python3.12
gyp info spawn args [
gyp info spawn args '/opt/homebrew/Cellar/node/22.2.0/libexec/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 '/Users/benji/code/kresus/node_modules/xml2json/node_modules/node-expat/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/opt/homebrew/Cellar/node/22.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/benji/Library/Caches/node-gyp/22.2.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=/Users/benji/Library/Caches/node-gyp/22.2.0',
gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/Cellar/node/22.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/benji/Library/Caches/node-gyp/22.2.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/benji/code/kresus/node_modules/xml2json/node_modules/node-expat',
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' ]
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmltok.o
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlrole.o
  LIBTOOL-STATIC Release/libexpat.a
  CXX(target) Release/obj.target/node_expat/node-expat.o
In file included from ../node-expat.cc:1:
../../nan/nan.h:2548:8: error: no matching member function for call to 'SetAccessor'
  tpl->SetAccessor(
  ~~~~~^~~~~~~~~~~
/Users/benji/Library/Caches/node-gyp/22.2.0/include/node/v8-template.h:1055:8: note: candidate function not viable: no known conversion from 'v8::AccessControl' to 'PropertyAttribute' for 5th argument
  void SetAccessor(
       ^
/Users/benji/Library/Caches/node-gyp/22.2.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 'AccessorGetterCallback' (aka 'void (*)(Local<String>, const PropertyCallbackInfo<Value> &)') for 2nd argument
  void SetAccessor(
       ^
In file included from ../node-expat.cc:1:
../../nan/nan.h:2594:8: error: no matching member function for call to 'SetAccessor'
  tpl->SetAccessor(
  ~~~~~^~~~~~~~~~~
/Users/benji/Library/Caches/node-gyp/22.2.0/include/node/v8-template.h:1055:8: note: candidate function not viable: no known conversion from 'v8::AccessControl' to 'PropertyAttribute' for 5th argument
  void SetAccessor(
       ^
/Users/benji/Library/Caches/node-gyp/22.2.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 'AccessorGetterCallback' (aka 'void (*)(Local<String>, const PropertyCallbackInfo<Value> &)') for 2nd argument
  void SetAccessor(
       ^
2 errors generated.
make: *** [Release/obj.target/node_expat/node-expat.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebrew/Cellar/node/22.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Darwin 23.4.0
gyp ERR! command "/opt/homebrew/Cellar/node/22.2.0/bin/node" "/opt/homebrew/Cellar/node/22.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/benji/code/kresus/node_modules/xml2json/node_modules/node-expat
gyp ERR! node -v v22.2.0
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.
@kapouer
Copy link

kapouer commented Dec 14, 2024

Could it be nodejs/nan#936 ?

@bnjbvr
Copy link
Author

bnjbvr commented Dec 14, 2024

No ideas. To be fair, I'm not so concerned about this issue anymore, since I've replaced use of the library that used node-expat in my project, since this was blocking us from using a more recent version of nodejs. Feel free to close, and thanks for the work done on this lib :)

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

No branches or pull requests

2 participants