How to install private npm packages OR from private Github repositories

As do not to how to install a private npm package on Glitch, I am trying to install from a private repository on Github.

Here is the link I am using: git+https://<access_token><user>/<respository>.git

This is working good and as expected offline on my iMac, but having hard luck on Glitch. I am getting this error in console log:

ERROR  Command failed: git ls-remote --refs git+ssh://<user>/<repository>.git master
No user exists for uid <uid>
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

I do not understand why Glitch is changing https to ssh and defaulting to git user.
Any help will be greatly appreciated. I do not want to make the module public on Github or npmjs yet.

Hey @rehmat sorry for the inconvenience; would you be willing to add as a collaborator on the repo so I can take a look? I may not get to it until tomorrow, but it would be better to be able to test with an actual npm module repo.

Thanks cori!

But, I decided to make a module instead.
Please check it here:

Works like a charm for me.

1 Like

That doesn’t work for me. My theory is that newer projects use pnpm by default, meaning that /app/node_modules/ is no longer used
Proof: require.resolve("discord.js") returns /rbd/pnpm-volume/.../node_modules/

Hi KinectTheUnknown, you can try using NPM. To do that run enable-npm in the terminal.

1 Like

Thank you for that, Melissa. I would still like Glitch to support dependancies in private Github repos.

We encourage you to create feature request topic for this so other users can vote on it, and it will happen faster. Thanks.

Opened this thread some time ago.
But, still need a solution to this.
I want to install PRIVATE npm modules.


Not yet, but if you create a feature request topic for this so other users can vote on it, it may happen faster. Thanks.

has this changed @Gareth , already?

Currently, I am facing an Error

ERROR 401 Unauthorized: @LIB (via https:/REPO_URL@LIB)

Though npm config ls -l shows me that .npmrc is taken into account

Credentials seem to be fine, double checked those. :man_shrugging: