-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
can't install under linux #310
Comments
Alright, i had: i had to downgrade node-gyp to version v5.0.3 |
@flatusv how did you downgrade? |
@cekvenich I had those packages installed via package manager. So for arch linux in /var/cache/pacman/pkg I looked for the next node-gyp version and did a "sudo pacman -U node-gyp.." |
beginning with node v.12.13 it will also fail to compile. Had to revert to v12.12.0 and node-gyp@5 |
Same issue here. Downgrading to node-gyp@5.0.5 and node v12.12.0 fixes it. |
Node v12.13 is LTS and it works on linux and mac without hacking node-gyp: The issue is that majority of people install node via nvm: and they have no problems. So I switched to nvm. |
Can confirm this issue on Arch using Node.js |
Having the same issue on Manjaro, on NVS (Node Version Switcher) on Node 12.x.
|
nvm should work with any version including 13. |
Same issue here...was using Arch node/npm packages. Switched to nvm and it's working now...had to use v10 LTS. Thanks @Sparkenstein
|
So weirdly this has stopped being an issue with pnpm (see original bug report here pnpm/pnpm#2075) but is still an issue with npm. I do not know where exactly the fix occurred in pnpm though. If you are able to switch to pnpm, you can be unblocked by the latest nodejs installed via a native package manager. Fair warning though, it is not a drop in replacement. You will need to consider a few implications. It works for me though! |
So I think I have solution for all. We should consolidate all these note under wiki. |
Please note that Python 2 will be out of maintenance all too soon... |
@flaschbier Clearly. But when I build on my machines under v3 (fedora default) I get a python error - fixed when I switch to v2. |
Also seen on Arch Linux with node v10 LTS. Switching system-level python versions is not a reasonable solution. |
@mikeshultz but it may not be related to this project. this may have to do w/ node js itself. so if there are PR the should go there. Or we can wait for node js upstream to fix it. |
This is the only package I'm having issues building, and I'm glad python 2 works for you @cekvenich, but changing what |
@mikeshultz What other C based package works w/ python 3 that you are using? Whatever it is reasonable, I would agree with you, maybe not reasonable, and I listed the problem it makes for me. I posted it, but I'm ok if it is seen as 'unreasonable'. I suspect that once Node supports python 3 (as per recent git commit) the issue may fix itself. There is also a sqlite .js based package that is ~ 20% slower in my tests than a C based one. |
I still had an issue working with python3 when installing. Switched to python2.7 seemed to fix the issue. It seems to be a problem with the NPM package integer. |
@austinmccalley Thx for verifying. Maybe not the integer, but node itself(when you use a C module). I'm looking at release notes for node v12.13.1 and it says they are now supporting python v3. |
Python 2 has been replaced with Python 3. This should be addressed here as a package install dependency. In the interim, I found that this works for me (using Fedora 31):
|
Any update on this now that Node v12 (Erbium) is the current LTS? Stacktrace:
|
@cdbattags I'm just a user: works great with any node version w/ python v2. |
I can also confirm that this is a problem with python3 compatibility with
|
@mcoffin altering this environment variable also works for me, i.e., |
@mcoffin Where should it be filed? Can you file and post here so we can +1 please. |
@cekvenich Well, it's already been fixed in later LTS versions of |
@mcoffin I get it to work w/ python 2 on the latest versions of everything, including node v13.x. I can never get it to work w/ python 3. So if you have a python 3 reproducible case, please share. Aside, I know it uses node-gyp, but I don't see node-gyp in the dependencies. |
I get this error with both Python 2 and 3!
Python: v2.6
Python: v3.7.3:
Oops this issue is related to linux, I'm installing on macOS :( |
@aminpaks Try 2.7 |
@cekvenich tried with 2.7 and this is what I get:
Here is the full log. |
Apparently there's a new version The reason is npm is using the old version Result of
|
It seems people are moving away from If you're interested about this story. |
Thanks @aminpaks for the link to the source of all our problems and the context for a solution! |
@aminpaks you get error: rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate I suggest you clean all your .npm (and .yarn files) and remove node, npm, global node libs, etc. |
I was stuck on this (Arch Linux) for awhile and was able to get past by deleting my .node_modules and global module dir, then running with |
FYI there is a new version of node-gyp: I think if you install it globally python 3 may work (until new versions of node are released with he new node-gyp, and that maybe allow us to close all these build bugs) |
And node LTS just did a release touching gyp: |
I found this a while back too, but didn't work for me. It talks about submodules of npm and how to update them:
|
This worked for me without needing to touch my Python install (thankfully). I was having trouble with that solution initially as npm was spitting out |
@thomotron Thank you for that information. I plan to try it, except I use yarn. |
@thomotron your solution works! This issue should now be closed. |
@thomotron what's your Python version? |
The following does also work for me on Arch without having to fiddle with subdependencies: $ PYTHON=$(which python2) yarn install The sad state of Node.js. |
It's npm. @mserajnik Feel free to upvote this upstream npm/cli#287 |
This should be fixed in the latest version of |
I get the following Error
Traceback (most recent call last): File "/usr/lib/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module> sys.exit(gyp.script_main()) File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main return main(sys.argv[1:]) File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main return gyp_main(args) File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 532, in gyp_main generator.GenerateOutput(flat_list, targets, data, params) File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2215, in GenerateOutput part_of_all=qualified_target in needed_targets) File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 794, in Write extra_mac_bundle_resources, part_of_all) File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 978, in WriteActions part_of_all=part_of_all, command=name) File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1724, in WriteDoCmd force = True) File "/usr/lib/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1779, in WriteMakeRule cmddigest = hashlib.sha1(command if command else self.target).hexdigest() TypeError: Unicode-objects must be encoded before hashing gyp ERR! configure error gyp ERR! stack Error:
gyp` failed with exit code: 1gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.3.6-arch1-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/geeray/uni/win-this/WebAnwendungen2/Praktikum/WebAnwendung2BackendAPI/WebAnw2Backend/node_modules/better-sqlite3
gyp ERR! node -v v12.12.0
gyp ERR! node-gyp -v v6.0.0
gyp ERR! not ok
npm WARN webanw2backend@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@5.4.3 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@5.4.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/geeray/.npm/_logs/2019-10-15T15_49_09_447Z-debug.log
`
The text was updated successfully, but these errors were encountered: