Npm install not properly running recursively

Investigating in terminal shows that …

another place to look: check the project logs panel, particularly when Glitch is trying to install the project dependencies

if I go into one of those, and check its node_modules, it only has two dependency folders installed

The next one I checked didn’t even have a node_modules folder.

that’s part of how module work in node.js, where those recursive dependencies can come from node_modules, ../node_modules, ../../node_modules, etc. so each dependency’s module folder doesn’t need to have all of its own dependencies

Node is >=16, npm is > 7. I tried switching to npm 8

not sure if related, but try running enable-npm just to make sure Glitch isn’t somehow putting the project in pnpm mode. it shouldn’t at that version of node.js. this’ll also delete and recreate the node_modules

C++ build / install steps in one of my dependencies

Seeing it missing, and checking the dependecy’s package.json, I saw a ‘build’ command related to the error, and it seemed like a build step hadn’t been run. Running it, I got an out-of-memory error.

out of memory error referring to a message in the project log from Glitch saying that the project exceeded the memory limit, and not a message in the terminal where you ran the command, right? because if it’s the former, that’s something that might be helped by boosting. if it’s the latter, then I think boosting shouldn’t help.

programs can allocate and use memory freely up to the host server’s actual limit. the Glitch project memory quota, the thing that varies by boosted status or not, is enforced by a separate program that periodically checks the the project’s memory usage periodically, and if it’s over the limit for too long, you see the former error in the project log and Glitch kills all app processes in the container

by the way, :shushing_face: the grace period for memory overages is higher during the install phase

Now I get a new infuriating problem–I can’t cd into the folder to run the command anymore.

cursed. this I think comes from the fact that ~/node_modules is a symlink out to a separate shared mount, which sounds like it operates over the network. something’s out of sync, and I don’t know how to fix it. probably try stopping your project container and hope that it comes back up on an uncursed machine. instructions posted a long time ago for how to stop the container:

:grimacing: the above instructions are probably out of date with the API changes since then. see how to make the request here if the above doesn’t work:

1 Like