[Bug]: Unable to install packages from CodeSandbox
See original GitHub issueSelf-service
- I’d be willing to implement a fix
Describe the bug
Package URLs from CodeSandbox doesn’t include tgz so Yarn is unable to install them
Originally reported by @phryneas
To reproduce
const installPromise = packageJsonAndInstall({
dependencies: {
[`@reduxjs/toolkit`]: `https://pkg.csb.dev/reduxjs/redux-toolkit/commit/7491320d/@reduxjs/toolkit`,
},
});
await expect(installPromise).resolves.toBeTruthy();
Environment
System:
OS: Windows 10 10.0.19042
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Binaries:
Node: 16.7.0 - ~\AppData\Local\Temp\xfs-d3717859\node.CMD
Yarn: 3.0.1-git.20210819.hash-32881f98b - ~\AppData\Local\Temp\xfs-d3717859\yarn.CMD
npm: 7.20.1 - C:\nodejs\npm.CMD
Additional context
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How we make npm packages work in the browser
There is a great advantage to this approach: we will be able to install and cache dependencies independently. We can just merge the...
Read more >FAQs - CodeSandbox
There are a few possible reasons a repo might throw that error on import. The most common are either a lack of a...
Read more >step1-install-dependencies - CodeSandbox
CodeSandbox is an online editor tailored for web applications.
Read more >Installing and using an NPM module - CodeSandbox
Installing and using an NPM module ... package.json ... Activating extension 'vscode.typescript-language-features' failed: Could not find bundled ...
Read more >install - CodeSandbox
edeityedeity. Templateuse-plugin; Environmentcreate-react-app. Files. public. src. App.js. index.js. styles.css. package.json. Dependencies.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

A workaround would be to use a url hash:
yarn add @reduxjs/toolkit@https://pkg.csb.dev/reduxjs/redux-toolkit/commit/7491320d/@reduxjs/toolkit#.tgz.Until CSB fixes how they are generating
package.jsonmanifests, this plugin can be used as a workaround: