Node.js not working | Sololearn: Learn to code for FREE!


Node.js not working

I got this iOS x86 emulator called iSH so I could use the terminal on iOS. It runs Alpine Linux. So far, it’s worked fantastically. However, when I try to run Node on it, it says nothing more than “Illegal Instruction”. Running “node --version” gives “v10.16.3” and running “node --v8-options” gives an error saying that it needs the cpu instruction sse2 to work. Any way to get around the sse2 dependency or will I have to either abandon Node or change terminals?

12/2/2019 12:14:52 AM

Jason Stone

6 Answers

New Answer


oh i remember you telling me the other day you found a termux alternative for Iphone. I have no idea why it doesnt work for you but... maybe it has to do with the limits on a terminal emulator on an unrooted phone. Although, on termux, I remember being able to run a website server on nodejs. sorry i cant help you much there. have you tried the essential though : running some code. ``` node mycode.js ```


Jason Stone [14 yrs old] Unfortunately, ish doesn't yet implement support for sse2 instructions, which is required by the V8 JIT compiler. So... you aren't going to be able to use this emulator. I don't do a lot these days with iOS, so, I can't speak from experience. However, there is a project for running NodeJS on Mobile Apps that uses a different Javascript engine to work on iOS. That might be worth checking out.


ChillPill David Carroll maybe you guys can help me with this question.


Crash oh ok. Took me a second to figure out you were talking about the places I advertised this. Can you please direct me to some threads for advertising questions?


ChillPill everything but node works. Any command starting with “node” other than “node --version” and “node --v8-options” return simply “Illegal Instruction” no matter what. Once, in an attempt to fix it, I corrupted node and any command involving it crashed the terminal. Delete and reinstall ensued, node no longer crashes the terminal, but it still don’t work. As I said in the question above I think node requires there to be a certain CPU instruction for the JIT to work and without it the CPU complains “illegal instruction” since it doesn’t recognise the instruction node is using. Also, I don’t think it has to do with the limits of the terminal emulator since it emulates an entire CPU which essentially gives it a free sandbox. It even runs Linux instead of iOS. Since it emulates the CPU there should be no dependancy on the actual underlying hardware except for activites such as downloading stuff from the web, but simply running node doesn’t do that.


David Carroll thanks, I’ll check out those links. Edit: good to know the sse2 thing is a known issue. I might look into the nodejs-mobile thing later if I can’t find a satisfactory solution for iSH. That last link thing tho, what exactly does it do? Is it something that overrides node’s V8 so it doesn’t need the sse2? That’s what I’ve understood by reading it but I’m still pretty uncertain. Does that mean I could thepretically use it in iSH?