ish
ish copied to clipboard
NPM Install Hanging
A continuation of #849. While the command no longer crashes, it now seems to hang indefinitely on both of my devices. It looks like this is related to something to do with the alpine edge
repo, rather than 3.12
. Exported rootFS is at the link below, as unfortunately it's too big for GH file upload.
npm install --save-dev --exact prettier
You can easily reproduce this from scratch by doing the following:
- Import a new rootfs.
- Edit
/etc/apk/repositories
to point toedge
instead ofv3.12
. -
apk update && apk upgrade --available
. -
apk add npm nodejs
. - Run the above command.
I can reproduce now, thanks for the rootfs download.
Excellent! It's a curious one!
Any update on this?
I get similar message when I run npm for a node app and gatsby app etc
Reupload since the link expired: https://drive.google.com/file/d/18dEdK4BkQ_IOeUaKm3qVP7Q5hz5xgY1R/view
I'm starting to suspect this is because of lack of TSO on arm. If so, it's pretty nuts that it's taken this long to become a problem.
Perhaps it's a stupid question, but I legitimately can't work out which definition of TSO you mean here: the memory ordering, or TCP segment offloading?
Memory ordering; ARM has a weaker memory model than Intel does. We’re looking into whether tightening the memory model on ARM causes the issue to go away. (So far, an Intel machine running iSH does not seem to exhibit this issue, which is supports but does not confirm this suspicion. Unfortunately the test we’ll run on ARM requires specific hardware and is just a diagnostic, not a fix.)
That definitely makes more sense than where my brain first went. Let me know if I can help at all.
Does not appear to be an issue with memory ordering, I was able to get hangs regardless of whether TSO was enabled.
Oh, interesting! Any idea what else it could be?
No idea. Maybe a bug in our ARM emulator? @tbodt will probably do the dirty work of figuring this out, so I’d ask him once he figures it out.
Fair! I'm very interested.
I have iPhone 12 Pro Max and have exactly the same issue. It's just hanging when I run for example npm i -g npm
and cannot exit the process I need to force close whole iSH
There are still runtime problems with node.js and npm on the latest version (as of 6/21/21) on iPad Pro with current iOS. Both will hang and ^C no longer works, requiring an app restart. npm is 100% unusable for anything except npm --version. Oddly, both worked briefly after a brand new install but now fail consistently. The regressions in comments above work to recreate the problem. This would be a great bug to have resolved since it would make it possible to do completely mobile node.js development. Right now, it's really not possible. I know there's nothing new in this comment. I'm just bumping this year-old issue in hopes that it gets some love soon.
@cshotton have you found any solution?
@cshotton have you found any solution?
I have not tried it lately. I'll give it a shot. Right now, it's completely random as to whether or not it will hang on any given node or npm invocation. Certainly the more complex the command (e.g. npm install of a large package.json), the more likely a hang has been. Short answer is no.
It sounds like a weird workaround, but adding --verbose
option to npm seems to make it work better. It still hangs sometimes though.
Any update on this? I haven't been able to run npm install in "ish". It never finishes.
Somehow when I crash the filesystem by playing around and by random googling in reddit. I found an old iSH vanilla FS in this thread: https://www.reddit.com/r/ish/comments/nzkm91/default_filesystem/.
Out of my curiosity, using this particular FS to install nodejs and npm can give you a working ( but outdated ) Node and Npm!
the download link is https://ish.shiggl.es/Vanilla.tar.gz, this file is not by me and please use it at your own risk!
I have a similar issue - a fresh installation has the same problems regardless of file-system After following the instructions from the docs, I find that changing the /etc/apk/repositories versions to 3.12 allows the installation of nodejs 12.22.1 and a compatible version of npm, and no installation works further than this Any other version of the repositories (3.14 in the default, 3.16, 3.17, etc) led to an incompatibility in npm and nodejs leading to "Illegal instruction" for anything and everything.
Even with the working versions of npm, there's the constant hang issue that never goes away. I've attempted with "npm install -g npm@latest", "npm install -g npm@latest --verbose" and "npm install -g npm@latest --verbose -dd", and it still gets stuck on the rollbackFailedOptional, which I'm not able to proceed forward with.
Could somebody provide some pointers on how I could go further? I'm trying to install code-server. My device is the iPad 9th gen.
Same issue on an iPad Air 5th gen, with installing the castnow
npm package
Just wondering if theres been any progress with npm? im trying to install 2 small packages awsp and ssh2