Code Monkey home page Code Monkey logo

Comments (12)

code-asher avatar code-asher commented on September 28, 2024

Probably related:
#5561
#5430

Does the npm i argon2 command have any errors? Does npm rebuild help?

I think we should try moving away from argon2.

from code-server.

haruki-py avatar haruki-py commented on September 28, 2024
userland@localhost:~$ npm i argon2

up to date, audited 5 packages in 9s

found 0 vulnerabilities

from code-server.

haruki-py avatar haruki-py commented on September 28, 2024
userland@localhost:~$ npm rebuild
rebuilt dependencies successfully

from code-server.

haruki-py avatar haruki-py commented on September 28, 2024

I tried running code-server again and same issue

from code-server.

haruki-py avatar haruki-py commented on September 28, 2024

#5561 is about termux. I can get it working on termux but I want in Ubuntu due to some reason like systemctl.
I think #5430 is related to this though

from code-server.

code-asher avatar code-asher commented on September 28, 2024

Yeah I am not sure, it seems like either a bug in argon2 or npm.

Although, the prompt says you are in ~; is that the right directory? I would expect it to be /home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server.

cd /home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server
npm rebuild # could also try npm i argon2

from code-server.

haruki-py avatar haruki-py commented on September 28, 2024
userland@localhost:~/.nvm/versions/node/v18.20.0/lib/node_modules/code-server$ npm rebuild # could also try npm i argon2
npm ERR! code 7
npm ERR! path /home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/argon2
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | arm
npm ERR! node-pre-gyp info check checked for "/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/argon2/lib/binding/napi-v3/argon2.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/ranisalt/node-argon2/releases/download/v0.31.1/argon2-v0.31.1-napi-v3-linux-arm-glibc.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.31.1/argon2-v0.31.1-napi-v3-linux-arm-glibc.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.31.1/argon2-v0.31.1-napi-v3-linux-arm-glibc.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm
npm ERR! gyp info find Python using Python version 3.10.6 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/argon2/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/userland/.cache/node-gyp/18.20.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/userland/.cache/node-gyp/18.20.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/userland/.cache/node-gyp/18.20.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/argon2',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! node-pre-gyp ERR! UNCAUGHT EXCEPTION
npm ERR! node-pre-gyp ERR! stack Error: ENOTEMPTY: directory not empty, rmdir 'build-tmp-napi-v3/Release/obj.target'
npm ERR! node-pre-gyp ERR! stack     at Object.rmdirSync (node:fs:1222:10)
npm ERR! node-pre-gyp ERR! stack     at rmkidsSync (/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/rimraf/rimraf.js:349:27)
npm ERR! node-pre-gyp ERR! stack     at rmdirSync (/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/rimraf/rimraf.js:329:7)
npm ERR! node-pre-gyp ERR! stack     at rimrafSync (/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/rimraf/rimraf.js:301:9)
npm ERR! node-pre-gyp ERR! stack     at /home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/rimraf/rimraf.js:336:39
npm ERR! node-pre-gyp ERR! stack     at Array.forEach (<anonymous>)
npm ERR! node-pre-gyp ERR! stack     at rmkidsSync (/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/rimraf/rimraf.js:336:26)
npm ERR! node-pre-gyp ERR! stack     at rmdirSync (/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/rimraf/rimraf.js:329:7)
npm ERR! node-pre-gyp ERR! stack     at rimrafSync (/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/rimraf/rimraf.js:301:9)
npm ERR! node-pre-gyp ERR! stack     at /home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/rimraf/rimraf.js:336:39
npm ERR! node-pre-gyp ERR! System Linux 4.9.117+
npm ERR! node-pre-gyp ERR! command "/home/userland/.nvm/versions/node/v18.20.0/bin/node" "/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/argon2
npm ERR! node-pre-gyp ERR! node -v v18.20.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11

npm ERR! A complete log of this run can be found in: /home/userland/.npm/_logs/2024-03-30T01_56_58_846Z-debug-0.log
userland@localhost:~/.nvm/versions/node/v18.20.0/lib/node_modules/code-server$ npm i argon2
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     '/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/.argon2-DrvUQdTV',
npm WARN cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/.argon2-DrvUQdTV/build-tmp-napi-v3/Release/obj.target'] {
npm WARN cleanup       errno: -39,
npm WARN cleanup       code: 'ENOTEMPTY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: '/home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/.argon2-DrvUQdTV/build-tmp-napi-v3/Release/obj.target'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]

added 333 packages, changed 1 package, and audited 521 packages in 2m

161 packages are looking for funding
  run `npm fund` for details

2 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues, run:
  npm audit fix --force

Run `npm audit` for details.

from code-server.

haruki-py avatar haruki-py commented on September 28, 2024

Im bad at js. I mean really bad in js. My main language is python but I tried with my very lil knowledge bout js and tried my maximum then only I opened this issue

from code-server.

code-asher avatar code-asher commented on September 28, 2024

No worries, npm is tricky especially with native modules like argon2.

I am not sure why ENOTEMPTY would happen here. I am reading online this can happen when there are network issues or other random failures, so it might be ephemeral. Does it persist if you run npm rebuild again? What about if you remove that directory (rm /home/userland/.nvm/versions/node/v18.20.0/lib/node_modules/code-server/node_modules/.argon2-DrvUQdTV -r) and then run npm rebuild again?

from code-server.

code-asher avatar code-asher commented on September 28, 2024

Closing as stale but feel free to comment if you come back to this.

from code-server.

haruki-py avatar haruki-py commented on September 28, 2024

It worked when I tried Ubuntu docs directly

from code-server.

code-asher avatar code-asher commented on September 28, 2024

Ah good to know! Sounds like they are out of date, I see they also specify Node 18 which is wrong now.

from code-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.