-
Notifications
You must be signed in to change notification settings - Fork 31
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
ValueError: invalid mode: 'rU' while trying to load binding.gyp #43
Comments
Hi, I will update the library in case there's a need, however it seems the
problem is in the node gyp itself now.
It's possible node-udev needs a fix on the configuration files. But I'd
first like you to isolate the problem. Can you see whether the issue
happens with any other library that uses gyp? If it does, there's a problem
with gyp, otherwise it's a problem with node-udev (and I get an example on
fixing it properly).
- Henri
la 3. kesäk. 2023 klo 11.29 Robin Rainton ***@***.***>
kirjoitti:
… Fails to install on Fedora FC38.
node v18.16.0
npm 6.14.8
python 3.11.3
Possible solution:
https://stackoverflow.com/questions/74715990/node-gyp-err-invalid-mode-ru-while-trying-to-load-binding-gyp
$ npm i udev
> @***@***.*** install ***@***.***/bindings-cpp
> node-gyp-build
> ***@***.*** install /opt/iobroker/node_modules/unix-dgram
> node-gyp rebuild
(node:7023) [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)
Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
sys.exit(gyp.script_main())
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
return main(sys.argv[1:])
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
return gyp_main(args)
^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
[generator, flat_list, targets, data] = Load(
^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
result = gyp.input.Load(build_files, default_variables, includes[:],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2782, in Load
LoadTargetBuildFile(build_file, data, aux_data,
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 234, in LoadOneBuildFile
build_file_contents = open(build_file_path, 'rU').read()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 6.3.4-201.fc38.x86_64
gyp ERR! command "/usr/bin/node-18" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/iobroker/node_modules/unix-dgram
gyp ERR! node -v v18.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
—
Reply to this email directly, view it on GitHub
<#43>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJIXPAUVZSRXSYS53VV2A3XJLYV7ANCNFSM6AAAAAAYZE4M74>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Do you have a specific test package in mind? FWIW, just triked to All I know is |
They seem to be aware of it, and the fix may come in next version.
nodejs/node-gyp#2219
Python files are easy to edit. Maybe you could edit the file in question
and fix it that way. I'm reading it's a change of a flag kind of thing.
Another option is running the gyp in downgraded python environment.
- Henri
su 4. kesäk. 2023 klo 8.07 Robin Rainton ***@***.***>
kirjoitti:
… Do you have a specific test package in mind? FWIW, just triked to npm i
nan which failed with the same error so maybe you are correct.
All I know is udev doesn't work here so looking for a solution. If that
is to wait for a fix in gyp (do you see an issue logged awaiting
resolution?) then so be it.
—
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJIXPC4A4J6WTFSIFE5RGDXJQJZXANCNFSM6AAAAAAYZE4M74>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fails to install on Fedora FC38.
node v18.16.0
npm 6.14.8
python 3.11.3
Possible solution: https://stackoverflow.com/questions/74715990/node-gyp-err-invalid-mode-ru-while-trying-to-load-binding-gyp
The text was updated successfully, but these errors were encountered: