Where are packages stored?

I noticed that when you get a package error, it would have a long path. I want to know where they are stored exactly because I see a lot of what looks like hashes of something random before and and after node_modules.

check this out: https://stackoverflow.com/questions/5926672/where-does-npm-install-packages

Thanks but I am talking about on glitch.

I was talking about this.

Image doesn’t appear to load, sorry!


look for the source path through the Windows console

I believe glitch gives your project an id, something like xxxx-xxxx-xxxx-xxxx which is where your project files are stored. As for node modules, they are shared between projects to reduce resource usage for everyone, so nobody knows exactly where which of your modules exist.

1 Like

You can access the folder by going into your terminal and type cd node_modules (or if you want you can just type dir node_modules) and you will get to know where it will installs the package modules. The folder is right in your app directory.

He wants to know what the gibberish/hash in the path of modules inside of node_modules means, he already knows they are stored in node_modules. Very simple question to understand.

1 Like

The gibberish, or the hash, is used by pnpm (which is the tool Glitch uses to install packages). It is called integrity hash, their purpose is to make sure that the files haven’t been tampered with. In the case of tampering I believe it will try to re-install the package to see if the integrity is matching.

1 Like

it’s in something called pnpm volume which is a shared volume of commonly used nodejs packages.

Reason why I asked a question is to edit a package without having to download it and upload it from my computer. But I do see the shrinkwrap.yaml file when exporting. That shows the packages’ integrity hash.