codesandbox / codesandbox/codesandbox-client

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

Open
#6,760 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project
    adheres to.
  • 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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the package.json in a private CodeSandbox linked to GitHub, then reproduce the install using a private npm package and the configured registry token and scope. Done means the private dependency installs successfully without the “Could not fetch dependencies” error; no source file or test is named in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, javascript
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.