When I added 'x' npm package, it keeps loading. After 1-2 minutes, it shows error as Error: Could not fetch dependencies, please try again in a couple seconds: Something went wrong while packaging the dependency and long list of deprecated packages.
I was trying to show demo of my npm package by using it in sandbox
Add react-donut as dependency. I tried this approach and it always yielded an error.
https://codesandbox.io/s/hopeful-buck-c401h

| Software | Name/Version |
| ---------------- | ------------ |
| Сodesandbox |
| Browser | Chrome(85.0.4183.83)
| Operating System | Linux (Ubuntu 18.04)
Looks like we're running the prepublishOnly step on install. This used be the standard behaviour before npm 4. Going to look into why we're running that.
Update: Scratch that, that ain't it. Looking deeper
Update:
This is what is at the end of the error - ENOSPC: no space left on device, write. Which means the node_modules was bigger than 512MB.
The 512MB limit is a limitation of how we install and package dependencies and definitely not your fault, but making the node_modules smaller would help everyone.
Looking at your package.json, I see things that should not be dependencies.
react-scripts → devDependencies
react, react-dom → peerDependencies or devDependencies, based on your package.
I created a new package and moved all 3 of these out of dependencies and it works: https://codesandbox.io/s/relaxed-bush-5kw8z?file=/src/App.js
Again, this is based on our limitations, you might have perfectly good reasons to keep those in dependencies. But if not, hopefully this solves the issue 👍
That's the problem, got it. Yeah it totally got out of my mind that those should be in devDependencies instead
Thanks for clear and concise explanation. Now I'll take steps and update my package accordingly.
Also, +1 for creating package and showing that demo
Great, happy to help!