codesandbox-client
codesandbox-client copied to clipboard
"Error Could not fetch dependencies" when trying to install private npm packages
🐛 bug report
Preflight Checklist
- [x] I have read the Contributing Guidelines for this project.
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.
Description of the problem
We have a private codesandbox that is linked to a private GitHub repository. In this, there are a few private npm packages. I have already put in the npm registry token and scope for the account (Registry Host: npm), but it still fails to install (commenting out the packages makes the codesandbox work).

How has this issue affected you? What are you trying to accomplish?
We are unable to get the sandbox to work correctly. Private npm packages will not download successfully.
To Reproduce
- create a private codesandbox that is linked to a private Github repo
- the package.json should have a private npm package that is on the npm registry
- add the relevant npm token that allows the account to download the package
- go to the codesandbox
Link to sandbox: link (optional)
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | |
| Browser | Google Chrome (Version 102.0.5005.61 (Official Build) (x86_64)) |
| Operating System | Mac OS Catalina (Version 10.15.7) |
I am having the same problem, have tried with different tokens (tested those locally on my machine and I can install the private packages correctly). In my case the packages are hosted on github.
Hey, @ahcai, have you managed to resolve this? I'm experiencing the same issue right now and looking for a solution. Custom registry and credentials are filled in in the profile (tried different passwords and methods: Basic, Bearer).