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

Error with node-gyp and utf-8-validate #3130

Closed
pickle69420 opened this issue Feb 14, 2025 · 3 comments
Closed

Error with node-gyp and utf-8-validate #3130

pickle69420 opened this issue Feb 14, 2025 · 3 comments

Comments

@pickle69420
Copy link

pickle69420 commented Feb 14, 2025

I just installed nodejs on oracle linux 9, try to setup a testing project, run npm i utf-8-validate, and this happens.

npm error code 1
npm error path /home/opc/uvapp/node_modules/bufferutil
npm error command failed
npm error command sh -c node-gyp-build
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | linux | arm64
npm error gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/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 '/home/opc/uvapp/node_modules/bufferutil/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/opc/.cache/node-gyp/22.11.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=/home/opc/.cache/node-gyp/22.11.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/opc/.cache/node-gyp/22.11.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/home/opc/uvapp/node_modules/bufferutil',
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 Traceback (most recent call last):
npm error   File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
npm error     import gyp  # noqa: E402
npm error   File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
npm error     import gyp.input
npm error   File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 8, in <module>
npm error     import gyp.common
npm error   File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py", line 435
npm error     if CC := os.environ.get("CC_target") or os.environ.get("CC"):
npm error            ^
npm error SyntaxError: invalid syntax
npm error gyp ERR! configure error 
npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:317:18)
npm error gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm error gyp ERR! System Linux 5.15.0-302.167.6.1.el8uek.aarch64
npm error gyp ERR! command "/usr/bin/node-22" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /home/opc/uvapp/node_modules/bufferutil
npm error gyp ERR! node -v v22.11.0
npm error gyp ERR! node-gyp -v v10.2.0
npm error gyp ERR! not ok
@pickle69420
Copy link
Author

Update: i installed newer python version but now there is a new error:

gyp ERR! build error 
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
npm error gyp ERR! System Linux 5.15.0-302.167.6.1.el8uek.aarch64
npm error gyp ERR! command "/usr/bin/node-22" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /home/opc/uvapp/node_modules/utf-8-validate

@cclauss
Copy link
Contributor

cclauss commented Feb 15, 2025

Updating Python was the correct thing to do. Please provide the full log of the new failure.

https://www.npmjs.com/package/utf-8-validate was recently updated and has good GitHub Actions tests.

@cclauss
Copy link
Contributor

cclauss commented Feb 17, 2025

What was the solution to this issue?

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

2 participants