Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript npm Basics (retiring) Installing Packages with npm Managing Dependencies in the package.json File

Sean Flanagan
Sean Flanagan
33,235 Points

Error occurs when trying to delete node_modules

Hi. Does anyone know why this happens? It takes about a minute or so to respond and then I get this message, forcing me to reboot the workspace.

1 Answer

Gabbie Metheny
Gabbie Metheny
33,778 Points

node_modules folders are usually enormous (dependencies on dependencies on dependencies...), so they always take quite awhile to delete (I usually walk away from my computer while I'm waiting for it to finish deleting). It might just be that with the limitations Treehouse has to place on workspaces, it's too much for the workspace to handle all in one request, so it throws an error.

Do you strictly need to delete the folder, or are you just following along with an example where they show you how you can delete it, then reinstall everything with npm install? If it's the latter, I'd just move on. Later, when you're working locally with your own terminal and text editor, it probably won't be a problem.

Sean Flanagan
Sean Flanagan
33,235 Points

Hi Gabbie. I'm just following Andrew's instructions to the letter. Once I crank the workspace up again, the deletion is complete. I'll do as you suggest and move on. Thanks.

Gabbie Metheny
Gabbie Metheny
33,778 Points

You bet! Glad to hear the delete eventually worked!