How do you access the node_modules directory?

I need to remove a Node package as part of the experimentation on Add support for more code install libraries - Feature Ideas - Glitch Support, but it won’t delete. How do I gain access to the node_modules directory?

You could either:

Access it via the terminal:

$ cd node_modules

Or un-gitignore it:

1 Like

I figured it out. Is there a way to make it show in the directory list, though?

Try the second method for that.

How would I do that?


But how do I get to the file?

Create a file called .gitignore.

I noticed this: You can write a file to the node_modules directory, but it doesn’t show anymore after you refresh. Can I access it somehow using that, @RiversideRocks ?

There’s a Terminal command called alias. Could that help?

That command isn’t even related to this topic, it creates aliases to other commands as the name suggests (man page)

Sorry. Got confused. Do you have any other ideas?

Glitch does not show node_modules intentionally, regardless of .gitignore. What do you need it for?


For now it’s probably easiest to buckle down with the command line and access node_modules from the terminal.

Glitch does its multi-user editing magic by reading all project files into memory; that way it can figure out how everyone’s edits play out right away. Because of that design, things get out of hand when there are too many files or when a file is too big. So in order to keep the editor working in a reasonable project, Glitch keeps the dependencies in node_modules out of the editor.

The .gitignore is one thing, but it’s not the entirety of all the programming inside of Glitch itself that’s meant to keep dependencies from making their way into the editor. I think some of that programming is not configurable by us users.

So for the two reasons (i) it would probably perform too poorly and (ii) there are unconfigurable rules preventing it, it might be able to go about this through the terminal instead.

1 Like

Troubleshooting and installing additional code catalogs such as Yarn, Git, and Docker.

Oh. That makes sense.

So you want to install yarn, git, and docker, or am I misreading it? If I’m correct:

  • Just add yarn to your package.json and it will be available globally
  • Git is already installed
  • You can’t install docker.

I did, at package.json – dapper-detailed-ruby ( Check it out. If you doubt me, I’ll give you access so you can see for yourself.

I don’t doubt you, and I don’t need access, however, yarn should be installed.

Yes. I installed it. I’ll see if it’s in a clean hello-express fork.