question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module './lib/binding/napi-v3/argon2.node'[Bug]:

See original GitHub issue

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

  1. Use the install script to install code-server in the standalone method
  2. Try running code-server (like code-server --version)
  3. 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

Screenshot_20220916_135343

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 package and npm with pacman
  • Using npm directly 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)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
utkustnrcommented, Nov 11, 2022

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-server after installing repo. Install script was created just a few days ago as well, figured I should give a heads up.

1reaction
code-ashercommented, Oct 28, 2022

Yeah I would not expect the standalone arm64 GitHub 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 use npm install instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug]: Cannot find module '@node-rs/argon2-linux-arm64-gnu ...
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.tgz ...
Read more >
Cannot find module 'bcrypt' - node.js - Stack Overflow
Using npm install bcrypt command can't resolve the issue for me. ... The Solution is pretty basic, I've solved this Error / Bug...
Read more >
Argon2 does not work with webpack #261 - Issuehunt
I'm having issues using argon2 in my project when building it with webpack and running it ... node_modules/node-pre-gyp/lib/pre-binding.js.exports.find (/[.
Read more >
How to solve argon2 install error when using NPM? | by Su Bak
After updated MacOS, I encountered error when new npm install. The errors looks like below: node-pre-gyp WARN Using request for node-pre-gyp https ...
Read more >
Error: Cannot find module 'm3u8stream/lib/parse-time'
Error: Cannot find module 'm3u8stream/lib/parse-time' Package.json: { “name”: “xxxx-xxx”, “version”: “8.6.0”, ... “start”: “node server.js”
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found