I can't install documentation.js


I’m trying to install documentation js. This gives me an error

A store server is running. All store manipulations are delegated to it.
ERROR  Unexpected store used for installation
expected: /root/.pnpm-store/2
actual: /rbd/pnpm-volume/store/2
If you want to use the new store, run the same command with the --force parameter.

When I do force, it does the same thing. What do I do?


What’s going on when you see this? It sounds like a pnpm error but not one I’ve seen from the automated install process. Are you running a console command that triggers this?


I’m just running npm -g install documentation. But nevermind, I got it working.


Ah that’s probably part of the problem - I think -g won’t work properly in our configuration.

May I ask what you did to get it working so other folks can reference your knowledge? Is there any reason you didn’t just put documentation in your package.json?


Ummm. Ok, first question first. I just installed it as if it were a regular module and it still installed the command. So I did npm install documentation and the documentation command works. And next question, Because the documentation.js’s documentation(try saying that 5 times fast) specifically said to use -g and in my experience, -g actually installs to your computer rather than downloading like a regular module


Yep, that’s the problem - a lot of packages just say “use -g” which actually means “install globally” (see the install docs). That won’t work in Glitch because you don’t have access to the “global” context of the container. Aside from that it also doesn’t make sense in the Glitch context because we already install everything to a globally-shared path, but you just shouldn’t have to worry about that at all. It would be nice if package authors didn’t just blindly assume that everyone can use -g.

We’re discussing tweaking things to make this a little more clear in the future.


Install globally? Ok. Random question, but I forgot how to delete every file in a directory?


Depending on what you want to do you have a couple of different options:

If you want to remove the directory and it’s contents then in the console rm -rf {directoryname} when you’re “in” the parent directory will work. That’s “forcibly remove this directory and all of its contents, recursively” and it can be dangerous, but in Glitch you can’t do any real damage to the container and you can always use the git repo or Rewind to get stuff back if you need to.

If you just want to remove the contents of a directory then in the console navigate to the directory and use rm *. Keep in mind that that will remove the directory from the editor as well (when the project restarts or you send a refresh command) since there won’t be anything in there to display. Alternatively you could use rm {path/to/directory}/*.


Well. That was definitely a complete answer, thanks!