Skip to content
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

Nodejs not working on latest version (Illegal instruction) #1482

Closed
jawshoeadan opened this issue Jul 3, 2021 · 19 comments
Closed

Nodejs not working on latest version (Illegal instruction) #1482

jawshoeadan opened this issue Jul 3, 2021 · 19 comments
Labels

Comments

@jawshoeadan
Copy link

To reproduce:

  1. apk add nodejs
  2. node
  3. Result: Illegal instruction
  4. dmesg result:
    3 stub syscall 383
    3 stub syscall 383
    6 stub syscall 383
    6 stub syscall 383
    6 stub syscall 383
    6 stub syscall 383
    7 stub syscall 383
    7 stub syscall 383
    7 stub syscall 383
    7 stub syscall 383
    5 stub syscall 383
    5 stub syscall 383
    8 stub syscall 383
    8 stub syscall 383
    8 stub syscall 383
    8 stub syscall 383
    8 stub syscall 383
    8 stub syscall 383
    8 stub syscall 383
    8 stub syscall 383
    8 stub syscall 383
    9 stub syscall 383
    9 stub syscall 383
    9 stub syscall 383
    9 stub syscall 383
    9 stub syscall 383
    9 stub syscall 383
    9 stub syscall 383
    9 stub syscall 383
    9 stub syscall 383
    5 stub syscall 383
    5 stub syscall 383
    5 stub syscall 383
    5 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 383
    10 stub syscall 375
    10 illegal instruction at 0x56fa1b2d: 66 0f c2 d1 02 66 0f 54
    5 stub syscall 383
    5 stub syscall 383
@saagarjha
Copy link
Member

cmplepd

@62f
Copy link

62f commented Jul 3, 2021

Duplicate of #1473
https://discord.com/channels/508839261924229141/510973900209913857/860682703330738186

@specious
Copy link

#1473 has some specific information that is relevant to this issue. The problem isn't with node per se, rather its use of an unimplemented instruction.

@specious
Copy link

@tbodt, looking at #90 I noticed that you implemented a bunch of instructions in 55816c8.

Perhaps you have some wisdom to share in this scenario?

@onatbas
Copy link

onatbas commented Jan 13, 2022

@tbodt, would you be able to comment on this?

@saagarjha
Copy link
Member

Not @tbodt, but there isn't really much to say here beyond "node uses an instruction unimplemented in iSH, and until someone adds that it won't work".

@emkey1
Copy link
Contributor

emkey1 commented Jan 13, 2022

Plus there is a workaround. Use an Alpine 3.12.9 mini root and it works fine, at least through version 14.5.0 which is included in apk nodejs-current.

I suspect newer versions of node would work as well if compiled under 3.12.9

@onatbas
Copy link

onatbas commented Jan 13, 2022

I just realized this unimplemented instruction is only needed in the later versions of node. For those who can work with an earlier version of node (8.14.0-r0).

Add https://dl-cdn.alpinelinux.org/alpine/v3.8/main to /etc/apk/repositories

apk update
apk add nodejs=8.14.0-r0
apk add npm=8.14.0-r0

Node works fine.

@ramantseshau
Copy link

I just realized this unimplemented instruction is only needed in the later versions of node. For those who can work with an earlier version of node (8.14.0-r0).

Add https://dl-cdn.alpinelinux.org/alpine/v3.8/main to /etc/apk/repositories

apk update apk add nodejs=8.14.0-r0 apk add npm=8.14.0-r0

Node works fine.

Great, thank you! But I looking for way to install node 12+ for trying to run code-server

@emkey1
Copy link
Contributor

emkey1 commented Jan 29, 2022

I just realized this unimplemented instruction is only needed in the later versions of node. For those who can work with an earlier version of node (8.14.0-r0).
Add https://dl-cdn.alpinelinux.org/alpine/v3.8/main to /etc/apk/repositories
apk update apk add nodejs=8.14.0-r0 apk add npm=8.14.0-r0
Node works fine.

Great, thank you! But I looking for way to install node 12+ for trying to run code-server

The one compiled for 3.12.9 should work as well. I believe it's version 14

@emkey1
Copy link
Contributor

emkey1 commented Jan 30, 2022

Actually, in 3.12.9 node-current is version 14.5.

The standard node version is 12.22

@davsket
Copy link

davsket commented Feb 22, 2022

I had to downgrade the repositories to alpine v3.12:

$ cat /etc/apk/repositories
https://dl-cdn.alpinelinux.org/alpine/v3.12/main
https://dl-cdn.alpinelinux.org/alpine/v3.12/community

Then by running:

apk update && apk add nodejs npm 

I got Node.js v12.22.10 installed and working.

@sascha1337
Copy link

but why this error on so many packages on iSH. any debugging foxes here able to debug? how2stacktrace?

@eanappi
Copy link

eanappi commented Apr 26, 2022

I had to downgrade the repositories to alpine v3.12:

$ cat /etc/apk/repositories
https://dl-cdn.alpinelinux.org/alpine/v3.12/main
https://dl-cdn.alpinelinux.org/alpine/v3.12/community

Then by running:

apk update && apk add nodejs npm 

I got Node.js v12.22.10 installed and working.

It's correct, but NPM not run. 👎

@xslim
Copy link

xslim commented May 2, 2022

I have added into /etc/apk/repositories

https://dl-cdn.alpinelinux.org/alpine/v3.12/main
https://dl-cdn.alpinelinux.org/alpine/v3.12/community

Than

apk update
apk add nodejs=12.22.12-r0
apk add npm=12.22.12-r0

npm seems working, but sometimes it hangs

@eanappi
Copy link

eanappi commented May 2, 2022

I have added into /etc/apk/repositories

https://dl-cdn.alpinelinux.org/alpine/v3.12/main
https://dl-cdn.alpinelinux.org/alpine/v3.12/community

Than

apk update
apk add nodejs=12.22.12-r0
apk add npm=12.22.12-r0

npm seems working, but sometimes it hangs

Very nice ... I'm going to try

@saagarjha
Copy link
Member

iSH 1.3 is out, which has fixes for this issue. Please try it out and file new issues with what you encounter!

@jawshoeadan
Copy link
Author

Works for me! Congrats on the new release y'all!

@sumi8a
Copy link

sumi8a commented Apr 5, 2024

I have added into /etc/apk/repositories

https://dl-cdn.alpinelinux.org/alpine/v3.12/main
https://dl-cdn.alpinelinux.org/alpine/v3.12/community

Than

apk update
apk add nodejs=12.22.12-r0
apk add npm=12.22.12-r0

npm seems working, but sometimes it hangs

Very nice ... I'm going to try

Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests