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

Delete libxmljs2 (builds fails on newer node) #1

Open
yocontra opened this issue Aug 4, 2021 · 6 comments
Open

Delete libxmljs2 (builds fails on newer node) #1

yocontra opened this issue Aug 4, 2021 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@yocontra
Copy link

yocontra commented Aug 4, 2021

Currently if you try to install this package the native extension for this dependency fails to build on node > 12.

PR on the base repo that fixes this: jaredhanson#108

@rwky
Copy link

rwky commented Aug 5, 2021

That was fixed a long time ago we don't use xtraverse we use libxmljs2

@rwky rwky closed this as completed Aug 5, 2021
@yocontra
Copy link
Author

yocontra commented Aug 5, 2021

@rwky Not sure why but a fresh install was failing for me with the same issue - let me check into it more and I'll bring back more info.

@rwky
Copy link

rwky commented Aug 6, 2021

Can you provide the package.json you're using so I can try it out?

@rwky rwky reopened this Aug 6, 2021
@yocontra
Copy link
Author

yocontra commented Aug 11, 2021

@rwky Issue is libxmljs2 doens't compile on latest node + macos - https://github.com/marudor/libxmljs2/issues/123. That being said - I think libxmljs2 is overkill for what passport-twitter needs. The response from twitter is fixed and known and the regex solution from that PR i linked in the original post here would solve the issue fine w/o needing a native dependency that needs to be constantly kept up to date w/ latest node.

❯ node -v
v16.6.1


❯ yarn add @passport-next/passport-twitter
yarn add v1.22.11
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
[5/5] 🔨  Building fresh packages...
[-/2] ⡀ waiting...
error /Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build --loglevel http
Arguments:
Directory: /Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2
Output:
node-pre-gyp http GET https://github.com/marudor/libxmljs2/releases/download/v0.26.7/node-v93-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/marudor/libxmljs2/releases/download/v0.26.7/node-v93-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/marudor/libxmljs2/releases/download/v0.26.7/node-v93-darwin-x64-unknown.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
(node:61537) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
  CXX(target) Release/obj.target/xmljs/src/libxmljs.o
In file included from ../src/libxmljs.cc:3:
In file included from /Users/contra/Library/Caches/node-gyp/16.6.1/include/node/v8.h:30:
/Users/contra/Library/Caches/node-gyp/16.6.1/include/node/v8-internal.h:488:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
            !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                ~~~~~^~~~~~~~~~~
                                     remove_cv
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:776:50: note: 'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
                                                 ^
1 error generated.
make: *** [Release/obj.target/xmljs/src/libxmljs.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/contra/.nvm/versions/node/v16.6.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/contra/.nvm/versions/node/v16.6.1/bin/node" "/Users/contra/.nvm/versions/node/v16.6.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--loglevel=http" "--module=/Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2/build/Release/xmljs.node" "--module_name=xmljs" "--module_path=/Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
gyp ERR! cwd /Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2
gyp ERR! node -v v16.6.1
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/contra/.nvm/versions/node/v16.6.1/bin/node /Users/contra/.nvm/versions/node/v16.6.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/contra/Projects/createsafe-wallet/services/api/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Darwin 20.6.0
node-pre-gyp ERR! command "/Users/contra/.nvm/versions/node/v16.6.1/bin/node" "/Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
node-pre-gyp ERR! cwd /Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2
node-pre-gyp ERR! node -v v16.6.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.5
node-pre-gyp ERR! not ok
Failed to execute '/Users/contra/.nvm/versions/node/v16.6.1/bin/node /Users/contra/.nvm/versions/node/v16.6.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/contra/Projects/createsafe-wallet/services/api/node_modules/libxmljs2/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)

@yocontra yocontra changed the title Delete xtraverse (builds fails on newer node) Delete libxmljs2 (builds fails on newer node) Aug 11, 2021
@kevinrambaud
Copy link

Hi, I'm having the same issue on macOS Monterey (12.0.1) on a project using Node.js 16.13.0. Any idea on what approach is preferred to resolve that?

@rwky
Copy link

rwky commented Nov 18, 2021

I think it's reasonable to swap out libxmljs2 with JS standard lib functions if someone wants to open a PR please do!

@rwky rwky added the help wanted Extra attention is needed label Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants