Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript npm Basics Installing Packages with npm Installing Local Packages

This is a technical issue with the Treehouse website. I cannot follow along with the npm workspace as I repeatedly get

Nothing to add.

...as I repeatedly get the message: "Workspace connection lost".

10 Answers

Myers Carpenter
Myers Carpenter
6,111 Points

Madeleine Wallner Hey. I took a look at what's happening. The bcrypt npm package has quite a lot of files (605), so many it's making the Treehouse workspace file daemon timeout while listing them all.

But no fear there is a way around it. In the teacher notes it says if you have problems with the bcrypt package, try the bcryptjs package, which only has 29 files and works just like the other package. You will need to import the bcryptjs package in place of bcrypt in your code.

Hi, Matt,

This was my latest contact from support on Apr 20: "Thanks for those details. We do apologize, we have created a report, but have not yet found a solution. We have gone ahead and applied a free week to your account for the time lost with this. Please know this is being looked into. We really appreciate your patience with this!"

So, we're on our own, I surmise. It was suggested to me to attempt to download the workspace but I got a permission error. I've had such disconnections repeatedly with other workspaces. I have been able to download some as I've been able to download project files. But some project files have several redundant copies of dependent folders so it can take a VERY long time and you end up with the redundant files in your local storage.

The whole point of Treehouse's personal workspace library is to keep a snapshot of each workspace you've used for future reference. Keeping track of that in your local storage is not as convenient, as is installing every npm package you may only use briefly.

Good luck, Nick

Myers Carpenter
Myers Carpenter
6,111 Points

Nickolas,

I'm one of the Treehouse developers. Sorry you've had problems with downloading workspaces. I'm having trouble figuring out what is happening when you are getting "permission error". Could you explain what is happening more?

I get the same issue also. I am using a mac 2,7 GHz Intel Core i5 de doble nĂșcleo MacBook Pro (Retina, 13-inch, Early 2015)

im getting the same issue, had a couple times where it gave me a 403 error too

Myers Carpenter
Myers Carpenter
6,111 Points

Justin White We had some site problems over the weekend. Perhaps you were affected by those? Are you still having problems?

Myers Carpenter I think it was just the site problem that happened over the weekend. So far everything has been working great!

I'm still getting that same error. The workspace keeps disconnecting and I can't download it. "403 Permissions".

Myers Carpenter
Myers Carpenter
6,111 Points

Desiree Dixon could you contact our support with your workspace id that you are having problems with?

stalaktite
stalaktite
5,060 Points

Hello,

I have a similar problem : npm downloads the packages (with warnings) but then I can't explore the created npm directory. Instead I get "Workspace connection lost" every time I try to, open it.

I get this with Chrome as well as Firefox, on my Windows 10 PC. Never encountered this problem before so I'd say this is linked to npm downloads.

Myers Carpenter
Myers Carpenter
6,111 Points

stalaktite could you contact our support with your workspace id that you are having problems with?

Madeleine Wallner
seal-mask
.a{fill-rule:evenodd;}techdegree
Madeleine Wallner
Full Stack JavaScript Techdegree Student 10,528 Points

I have the exact same problem. I contacted support and gave them my workspace id. They told me to create a post here on the forum, but I don't know if that's necessary when this one already exists?

Myers Carpenter
Myers Carpenter
6,111 Points

Johnny Austen It has to do with the bcrypt package in question having more files than workspaces can handle. If you use the bcryptjs it will work in workspaces.

Marta Lewandowska
Marta Lewandowska
4,988 Points

I was having this problem too - every time I wanted to uninstall the bcrypt the connection was lost! I ended up deleting manually the node_modules package by right-clicking and delete. It was the only thing that helped in my case (after 30 mins of frustration!) Than as said before I installed bcryptjs and everything work smoothly. Good luck