code-server: [Bug]: Cannot find module '@node-rs/argon2-linux-arm64-gnu'
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Firefox 96.0.3 (64-bit)
- Local OS: macOS 10.14.6 (Mojave)
- Remote OS: Debian bullseye
- Remote Architecture: aarch64
code-server --version: code-server 4.0.2 5cdfe74686aa73e023f8354a9a6014eb30caa7dd
Steps to Reproduce
git clone https://gitlab.b-data.ch/jupyterlab/julia/docker-stack.gitcd docker-stack/verdocker build -t julia-ver -f latest.Dockerfile .
Expected
Successful build
Actual
https://gitlab.b-data.ch/jupyterlab/r/r-ver/-/jobs/20883
Logs
[...]
Error: Cannot find module '@node-rs/argon2-linux-arm64-gnu'
Require stack:
- /opt/code-server/node_modules/@node-rs/argon2/index.js
- /opt/code-server/out/node/util.js
- /opt/code-server/out/node/cli.js
- /opt/code-server/out/node/entry.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/opt/code-server/node_modules/@node-rs/argon2/index.js:172:31)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/code-server/node_modules/@node-rs/argon2/index.js',
'/opt/code-server/out/node/util.js',
'/opt/code-server/out/node/cli.js',
'/opt/code-server/out/node/entry.js'
]
}
[...]
Screenshot/Video
No response
Does this issue happen in VS Code?
- I cannot reproduce this in VS Code.
Are you accessing code-server over HTTPS?
- I am using HTTPS.
Notes
Related issues:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 36 (17 by maintainers)
Commits related to this issue
- codeserver 4.0.2 is broken: https://github.com/coder/code-server/issues/4804 — committed to haraldkoch/kochhaus-home by deleted user 2 years ago
- revert: partial revert of 723469ab5bed3ba9fbb3e8d5ecbfcd9a3bee2d88 This reverts part of the changes introduced in refactor: migrate from argon2 -> @node-rs/argon2 (#4733) Switching to @node-rs/argon... — committed to coder/code-server by jsjoeio 2 years ago
- revert: @node-rs/argon2 -> node-argon2 (#4829) * revert: partial revert of 723469ab5bed3ba9fbb3e8d5ecbfcd9a3bee2d88 This reverts part of the changes introduced in refactor: migrate from argon2 -> ... — committed to coder/code-server by jsjoeio 2 years ago
- Remove code-server It doesn't work on arm64 https://github.com/coder/code-server/issues/4804 I don't use it enough — committed to vaskozl/home-infra by vaskozl 2 years ago
- revert code-server to v4.0.1 Signed-off-by: Jeff Billimek <jeff@billimek.com> — committed to billimek/k8s-gitops by billimek 2 years ago
- revert: @node-rs/argon2 -> node-argon2 (#4829) * revert: partial revert of 723469ab5bed3ba9fbb3e8d5ecbfcd9a3bee2d88 This reverts part of the changes introduced in refactor: migrate from argon2 -> ... — committed to TinLe/code-server by jsjoeio 2 years ago
I found a Temporary solution for this problem.
sudo apt remove code-serverThanks for mentioning this. I can temporarily fix it by manually downloading
https://registry.yarnpkg.com/@node-rs/argon2-linux-arm64-gnu/-/argon2-linux-arm64-gnu-1.0.5.tgzand put it into/usr/lib/code-server/node_modules/@node-rs/argon2-linux-arm64-gnu.Haha I completely spaced that we use yarn not npm.
npm_config_build_from_sourcemight work! You might need Rust and Cargo installed. I looked more intooptionalDependenciesbut I did not see anything in the docs about it only downloading some of them based on platform.FWIW, this appears to be the offending commit: https://github.com/coder/code-server/commit/723469ab5bed3ba9fbb3e8d5ecbfcd9a3bee2d88
I’ve solved it for myself by running 4.0.1, which doesn’t seem to have that problem.
@jsjoeio you can consider switch back to
@node-rs/argon2again since https://github.com/npm/cli/pull/6755 landedRoot cause seems to be this: https://github.com/npm/arborist/pull/231
Optional dependencies are only downloaded for the current platform rather than the target platform.
Long-term solution probably involves modifying that behavior in npm to use the target platform instead but in the meantime revert seems like the way to go.
Let me ping the node-rs team (they were super helpful when we made the migration).
cc @Brooooooklyn @yisibl - is there anything obvious we might have missed in the migration? Otherwise, I’ll see if I can dig in and see where this is coming form.
i also got these errors in 4.0.2.
too many bugs after version 4.0, i have downgrade my code-server to3.12.