codesandbox-client icon indicating copy to clipboard operation
codesandbox-client copied to clipboard

"Error Could not fetch dependencies" when trying to install private npm packages

Open ahcai opened this issue 3 years ago • 2 comments

🐛 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).

Screen Shot 2022-06-21 at 4 32 17 PM

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)

ahcai avatar Jun 21 '22 20:06 ahcai

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.

victorlongon avatar Nov 01 '22 15:11 victorlongon

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).

wijionejs avatar Jun 23 '23 10:06 wijionejs