Skip to content

Yarn installation fails incompatible engine 'node' #4415

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

Closed
Justxd22 opened this issue Oct 29, 2021 · 21 comments
Closed

Yarn installation fails incompatible engine 'node' #4415

Justxd22 opened this issue Oct 29, 2021 · 21 comments
Labels
blocked This issue cannot proceed due to external factors

Comments

@Justxd22
Copy link

Justxd22 commented Oct 29, 2021

OS/Web Information

  • Web Browser: ~
  • Local OS: Android q aarch64 (arm64)
  • Remote OS: ~
  • Remote Architecture: ~
  • code-server --version: latest

Steps to Reproduce

  1. Latest termux version
  2. apt update && apt upgrade && apt install build-essential python git nodejs-lts yarn

3.yarn global add code-server

Expected

Install?

Actual

yarn complains about nodejs version expected v14 (the old lts)
The problem is the nodejs-lts is now v16 how can i get v14? Should I go with the standalone install?

Screenshot

Screenshot_20211029_232247

@Justxd22
Copy link
Author

edit :

Using the ignore engines flag :

yarn global add code-server --ignore-engines
yarn global v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "code-server > @coder/[email protected]" has unmet peer dependency "@google-cloud/logging@^4.5.2".
[4/4] Building fresh packages...
[1/3] ⠠ argon2
[-/3] ⠐ waiting...
error /data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | android | arm64
node-pre-gyp info check checked for "/data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3/argon2.node" (not found)
node-pre-gyp http GET https://github.com/ranisalt/node-argon2/releases/download/v0.28.2/argon2-v0.28.2-napi-v3-android-arm64-unknown.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.2/argon2-v0.28.2-napi-v3-android-arm64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v102 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.2/argon2-v0.28.2-napi-v3-android-arm64-unknown.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | android | arm64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | android | arm64
gyp info find Python using Python version 3.10.0 found at "/data/data/com.termux/files/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v17.0.1/node-v17.0.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v17.0.1/node-v17.0.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v17.0.1/SHASUMS256.txt
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v17.0.1/SHASUMS256.txt failed, reason: socket hang up
gyp ERR! stack at ClientRequest. (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:110:14)
gyp ERR! stack at ClientRequest.emit (node:events:390:28)
gyp ERR! stack at TLSSocket.socketOnEnd (node:_http_client:471:9)
gyp ERR! stack at TLSSocket.emit (node:events:402:35)
gyp ERR! stack at endReadableNT (node:internal/streams/readable:1340:12)
gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
gyp ERR! System Linux 4.14.116
gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3/argon2.node" "--module_name=argon2" "--module_path=/data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2
gyp ERR! node -v v17.0.1
gyp ERR! node-gyp -v v8.2.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess. (/data/data/com.termux/files/home/.config/yarn/global/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1062:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Linux 4.14.116
node-pre-gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2
node-pre-gyp ERR! node -v v17.0.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.6
node-pre-gyp ERR! not ok
Failed to execute '/data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)

@jsjoeio
Copy link
Contributor

jsjoeio commented Oct 29, 2021

Node v14 is the newest version supported by code-server at this time.

error /data/data/com.termux/files/home/.config/yarn/global/node_modules/argon2: Command failed.

Argh, this seems to be blocking a lot of people. Can you check the node-argon2 docs here?

@jsjoeio jsjoeio added the waiting-for-info Waiting for more information from submitter label Oct 29, 2021
@Justxd22
Copy link
Author

Node v14 is the newest version supported by code-server at this time.

Unfortunately v14 isn't available anymore according to node the new nodejs-lts v16 started 5 days ago, and I can't find the old package in archives, i think you will have to somehow support the new lts?

Argh, this seems to be blocking a lot of people. Can you check the node-argon2 docs here?

I had a backup of my previous install, i will stick with it for now with code-server v3.9.3, i will test again with steps from node-argon2 when I'm free, thanks guys for your efforts

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 1, 2021

Unfortunately v14 isn't available anymore according to node the new nodejs-lts v16 started 5 days ago, and I can't find the old package in archives, i think you will have to somehow support the new lts?

Hmm... can you try using nvm to install v14?

i will test again with steps from node-argon2 when I'm free

Sounds good!

@anonimo82
Copy link

Having the same issue here.
Is it there any update?

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 2, 2021

@anonimo82 have you tried using v14?

@anonimo82
Copy link

No, how can I?

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 2, 2021

@anonimo82 use nvm. Here is a video or you can read the docs here

@tmgast
Copy link

tmgast commented Nov 3, 2021

Chiming in as I'm also attempting to do a new install with a similar environment.

nvm doesn't work on Termux because Termux is now required to use a PREFIX env var to work with Android 11's new security policies. nvm does not allow this and the only suggestion I've seen is to clear the PREFIX, which is not possible without completely breaking Termux.

I've also attempted to use n, which is a similar solution for running multiple instance of Node, however, n doesn't appear to install a version of Node compatible with the OS. It may still be a solution, though more testing is needed, but I currently believe Termux/Android users are stuck with only latest and -lts versions of Node.

@anonimo82
Copy link

@jsjoeio consider I'm working with Termux, package nvm is not available there

@jsjoeio
Copy link
Contributor

jsjoeio commented Nov 3, 2021

@tmgast thanks for all the details! I wasn't aware of that. Shoot, well I'm at a stand still then. I'm not sure exactly what we can do here 🤔 I'm going to mark this as blocked until we can find a workaround.

cc @code-asher in case you see any obvious solutions.

@jsjoeio jsjoeio added blocked This issue cannot proceed due to external factors and removed waiting-for-info Waiting for more information from submitter labels Nov 3, 2021
@anonimo82
Copy link

anonimo82 commented Nov 3, 2021

Workaround: use VHEditor https://github.com/vhqtvn/VHEditor-Android

By the way, all we need to do is targeting the latest node.js version. I hope it's easy enough

Edit: For the records, here is the issue
https://pastebin.com/AYyUkABU

Note I'm using nodejs-lts package from Termux repository

@code-asher
Copy link
Member

code-asher commented Nov 4, 2021 via email

@RoyGalaxy
Copy link

I also tried nvm and the --ignore-engines flag while installing via yarn none of them worked kindly make code-server compatible with v16 of node 🙏

@anonimo82
Copy link

anonimo82 commented Nov 5, 2021

@RoyGalaxy, @code-asher told VS-Code is not compatible with that Node.js version yet, so the least we can do is just wait. Or, if you use Termux, persuade theyr developers to downgrade Node package, or make them offer a build 14 as a separate package, which is what I'm trying to do here: termux/termux-packages#7930

@anonimo82
Copy link

Look at the link, it now works!

@code-asher
Copy link
Member

code-asher commented Nov 5, 2021 via email

@anonimo82
Copy link

anonimo82 commented Nov 5, 2021

In fact, I'm having troubles with extensions, beside this, it works

Look at this: termux/termux-packages#7930 (comment)

@stale
Copy link

stale bot commented May 4, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label May 4, 2022
@Justxd22
Copy link
Author

Justxd22 commented May 5, 2022

Btw, i digged in my old backups i found code-server with node 14 installed I'm using it and it's working fine, I want to pack a .deb of node 14 for sharing if any one wants it, also so I can install on other devices,

anyone know if it's possible to pack a .deb package of node?

@stale stale bot removed the stale label May 5, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented May 6, 2022

anyone know if it's possible to pack a .deb package of node?

No idea! But I will close this for now.

@jsjoeio jsjoeio closed this as completed May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue cannot proceed due to external factors
Projects
None yet
Development

No branches or pull requests

6 participants