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

Install fails on freebsd do to missing argon2 #4670

Closed
mike-pt opened this issue Dec 30, 2021 · 11 comments
Closed

Install fails on freebsd do to missing argon2 #4670

mike-pt opened this issue Dec 30, 2021 · 11 comments
Assignees
Labels
waiting-for-info Waiting for more information from submitter
Milestone

Comments

@mike-pt
Copy link

mike-pt commented Dec 30, 2021

OS/Web Information

  • Web Browser: Firefox
  • Local OS: FreeBSD
  • Remote OS: FreeBSD
  • Remote Architecture: amd64
  • code-server --version:

Steps to Reproduce

  1. "npm install -g code-server"

Expected

should install fine

Actual

npm ERR! 1 warning and 4 errors generated.
npm ERR! gmake: *** [argon2.target.mk:119: Release/obj.target/argon2/src/argon2_node.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `gmake` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System FreeBSD 13.0-RELEASE
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node" "--module_name=argon2" "--module_path=/usr/local/lib/node_modules/code-server/node_modules/argon2/lib/binding/napi-v3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/code-server/node_modules/argon2
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/usr/local/lib/node_modules/code-server/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/code-server/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System FreeBSD 13.0-RELEASE
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/code-server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /usr/local/lib/node_modules/code-server/node_modules/argon2
npm ERR! node-pre-gyp ERR! node -v v16.2.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.8
npm ERR! node-pre-gyp ERR! not ok

Notes

This happen because argon didn't use to provide FreeBSD prebuild packages, however this is no longer the case, there binary node files now, and this includes FreeBSD:

https://github.com/napi-rs/node-rs/releases

@jsjoeio
Copy link
Contributor

jsjoeio commented Jan 3, 2022

Woah, this looks new. Are you saying we should update the docs to tell users to install argon2 locally before installing code-server?

@jsjoeio jsjoeio added the waiting-for-info Waiting for more information from submitter label Jan 3, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Jan 3, 2022

node-rs now publishes an argon2 package. Might help here: https://github.com/napi-rs/node-rs/tree/main/packages/argon2

@53hornet
Copy link

I'm running to this issue as well on 13.0-RELEASE-p6. Is there any additional information I can include to get a fix going? The install continues to fail on

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.5/argon2-v0.28.5-napi-v3-freebsd-x64-unknown.tar.gz

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 25, 2022

I'm not sure what 13.0-RELEASE-p6 is.

Can you try using 4.2.0?

@53hornet
Copy link

It's the FreeBSD version. This open issue is for failed FreeBSD installations. I am using the latest code-server.

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 25, 2022

I'm not super familiar with FreeBSD but we use node-argon2 for hashing passwords. It looks like someone opened an issue upstream: ranisalt/node-argon2#320

I wonder if we could make node-argon2 an optional dependency 🤔 But since it's the default for hashing passwords, then we'd probably have to add a check there to see if it's available.

@code-asher any ideas?

@code-asher
Copy link
Member

code-asher commented Mar 31, 2022 via email

@53hornet
Copy link

Is that something I can platform test or help with in any way?

@code-asher
Copy link
Member

code-asher commented Mar 31, 2022 via email

@code-asher code-asher mentioned this issue Aug 19, 2022
4 tasks
@ranisalt
Copy link

Try updating to argon2@0.29.1 which packages prebuilt binaries for FreeBSD.

@jsjoeio jsjoeio self-assigned this Aug 23, 2022
@jsjoeio jsjoeio added this to the August 2022 milestone Aug 23, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Aug 23, 2022

Closing via #5492

@jsjoeio jsjoeio closed this as completed Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-info Waiting for more information from submitter
Projects
None yet
Development

No branches or pull requests

5 participants