code-server: Cannot find module './lib/binding/napi-v3/argon2.node'[Bug]:
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Brave
- Local OS: Android
- Remote OS: Android (Termux, using proot-distro with the archlinux distro)
- Remote Architecture: ARM64
code-server --version: 4.7.0 (can’t use command since it can’t run, but this is the version I downloaded)
Steps to Reproduce
- Use the install script to install code-server in the standalone method
- Try running code-server (like
code-server --version) - It fails.
Expected
code-server to run fine without any errors.
Actual
code-server crashes with the following error:
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './lib/binding/napi-v3/argon2.node'
Require stack:
- /home/radiatedexodus/.local/lib/code-server-4.7.0/node_modules/argon2/argon2.js
- /home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/util.js
- /home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/cli.js
- /home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/entry.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/radiatedexodus/.local/lib/code-server-4.7.0/node_modules/argon2/argon2.js:6:25)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/radiatedexodus/.local/lib/code-server-4.7.0/node_modules/argon2/argon2.js',
'/home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/util.js',
'/home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/cli.js',
'/home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/entry.js'
]
}
Logs
Can’t run code-server at all, following error thrown:
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './lib/binding/napi-v3/argon2.node'
Require stack:
- /home/radiatedexodus/.local/lib/code-server-4.7.0/node_modules/argon2/argon2.js
- /home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/util.js
- /home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/cli.js
- /home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/entry.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/radiatedexodus/.local/lib/code-server-4.7.0/node_modules/argon2/argon2.js:6:25)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/radiatedexodus/.local/lib/code-server-4.7.0/node_modules/argon2/argon2.js',
'/home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/util.js',
'/home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/cli.js',
'/home/radiatedexodus/.local/lib/code-server-4.7.0/out/node/entry.js'
]
}
Screenshot/Video

Does this issue happen in VS Code or GitHub Codespaces?
- I cannot reproduce this in VS Code.
- I cannot reproduce this in GitHub Codespaces.
Are you accessing code-server over HTTPS?
- I am using HTTPS.
Notes
- Albeit i’m using Termux, I run code-server in a proot-distro environment using the archlinux distro!
- Installed
nodejs-lts-gallium packageandnpmwith pacman - Using
npmdirectly doesn’t really work for me, the last time I’ve used it, no matter what I do I couldn’t upgrade code-server when a new release was released. (either saying it can’t find some cached files, or it doesn’t do anything and make me waste time)
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 21 (11 by maintainers)
Hey, I know this is not directly connected to argon2 issue but since I bringed up termux I might as well follow up on it. Apparently termux has a user repository with it’s own code-server install script. (see here: code-server) Installing code-server was as easy as
pkg install code-serverafter installing repo. Install script was created just a few days ago as well, figured I should give a heads up.Yeah I would not expect the standalone
arm64GitHub release to work on Android. I believe we would need to compile specifically for Termux rather than generic Linux arm64. We should fix the install script trying to download a release that will not work and make it usenpm installinstead.Thank you for sharing all that! One idea, which we’ve tried in the past is switching to @node-rs/argon2 (see here: https://github.com/coder/code-server/issues/4804#issuecomment-1030338395). We may investigate that again and see if using
--forcewith thenpm installworks.Sorry to bump the issue but I’ve had the same problem with op but mine was inside termux shell, not proot. Since links are a known issue I wanted to share my own insight to the problem. When you ignore the argon2 issue with yarn / npm and run install script it gives this output :
But since I have root access why shouldn’t I use it when it’s just basic links right? This is the output when you fix linking issue :
As you can see node wasn’t recognized so I had to link it manually as well. I couldn’t go past this I’m afraid. Let me know if these help. Thanks.
Edit: Termux has mingw-w64-gcc-libs package that includes libstdc++ but installing it did not change anything whatsoever.
Ah yeah if you are using something like proot I believe the prebuild should work. Running directly on Termux should not work though as that would require specifically compiling for Termux.
I think our Termux docs mention proot but I wonder if our installer has some issues in that scenario like pulling the wrong prebuild. It would be worthwhile to verify the install script’s behavior in proot with a dry run to see what is trying to do.
There are some symlinks but I am not sure how they would break. It would make sense to see if we can reliably reproduce.
@jsjoeio I suppose code-server uses symlinks right? I think those links broke in the process of installation (I tried moving the extracted code-server from the comment above to
~/.local/liband it gave back me argon2 error, rm-rf’ed the folder and re-extracted the tar withtar -xvf /path/to/code-server-tar.tar.gzin lib folder at .local and it worked fine)It works when you download a
tar.gzrelease for arm64, and run it direcrtly, executingcode-serverwhich is stored in the bin folder.My specs are: termux the latest version (installed from github releases) proot’ed into manjaro-aarch64 node 18
The result:
But yes, the errors are the same when installed via the script.
@jsjoeio I understand. I’ll wait for the fix, you can take your time!
Thank you for the thorough explanation @RealEthanPlayzDev! I can empathize, this sounds frustrating. I am not sure myself or @code-asher have bandwidth to dive deep on this right now but I’ll make it high priority and we can look at this in the upcoming or next milestone.
@jsjoeio Nope, I don’t think it worked: (followed installation and rebuild steps, both failed)
I believe I’ve been starting to have issues with installating a standalone release ever since v4.5.1 when I reset my Termux data to redo it from scratch again, before that I used to be able to install v4.0.0, v4.0.2, v4.0.5