🐛 BUG: Snowpack doesn't work with Yarn berry: skypack tried to access tar
See original GitHub issueQuick checklist
- I am using the latest version of Snowpack and all plugins.
What package manager are you using?
yarn
What operating system are you using?
macOS Big Sur
Describe the bug
I am not sure what is making side-effect but every time I create a new project and switch to Yarn berry via the command yarn set version berry
, Snowpack won’t start the development server. Also, the build
command doesn’t work.
/Users/username/seia/repositories/portfolio/.pnp.js:11954
throw firstError;
^
Error: skypack tried to access tar, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: tar (via "tar")
Required by: skypack@npm:0.3.2 (via /Users/username/seia/repositories/portfolio/.yarn/cache/skypack-npm-0.3.2-7801704069-9e3dbb10a4.zip/node_modules/skypack/lib/)
Require stack:
- /Users/username/seia/repositories/portfolio/.yarn/cache/skypack-npm-0.3.2-7801704069-9e3dbb10a4.zip/node_modules/skypack/lib/index.js
- /Users/username/seia/repositories/portfolio/.yarn/cache/snowpack-npm-3.8.2-d207dff0f8-eeea1eeca8.zip/node_modules/snowpack/lib/cjs/util.js
- /Users/username/seia/repositories/portfolio/.yarn/cache/snowpack-npm-3.8.2-d207dff0f8-eeea1eeca8.zip/node_modules/snowpack/lib/cjs/commands/add-rm.js
- /Users/username/seia/repositories/portfolio/.yarn/cache/snowpack-npm-3.8.2-d207dff0f8-eeea1eeca8.zip/node_modules/snowpack/lib/cjs/index.js
- /Users/username/seia/repositories/portfolio/.yarn/cache/snowpack-npm-3.8.2-d207dff0f8-eeea1eeca8.zip/node_modules/snowpack/index.bin.js
at internalTools_makeError (/Users/username/seia/repositories/portfolio/.pnp.js:11698:34)
at resolveToUnqualified (/Users/username/seia/repositories/portfolio/.pnp.js:12663:23)
at resolveRequest (/Users/username/seia/repositories/portfolio/.pnp.js:12755:29)
at Object.resolveRequest (/Users/username/seia/repositories/portfolio/.pnp.js:12833:26)
at Function.external_module_.Module._resolveFilename (/Users/username/seia/repositories/portfolio/.pnp.js:11931:34)
at Function.external_module_.Module._load (/Users/username/seia/repositories/portfolio/.pnp.js:11796:48)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/Users/username/seia/repositories/portfolio/.yarn/cache/skypack-npm-0.3.2-7801704069-9e3dbb10a4.zip/node_modules/skypack/lib/index.js:10:31)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
Steps to reproduce
- mkdir tmp
- cd tmp
- yarn create snowpack-app . --force --use-yarn --template @snowpack/app-template-react
- yarn set version berry
- yarn
- yarn start
Link to minimal reproducible example (optional)
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
[Bug] Your application tried to access @snowpack/plugin ...
Describe the bug. The Snowpack build tool doesn't work with Yarn v2, or rather, when PNP is enabled. We list both Snowpack and...
Read more >Troubleshooting | Yarn
This error simply means that the specified package is requiring something without explicitly declaring it in its dependencies. Since this behavior is unsafe...
Read more >Making a dependency's dependencies available with Yarn 2
Error : Your application tried to access @snowpack/plugin-dotenv, but it isn't declared in your dependencies; this makes the require call ...
Read more >Getting started with Yarn 2 and TypeScript | by xsmith - Medium
One of the best things about Yarn 2 is that it started using available resources instead of forcing you to adapt to new...
Read more >Building a Monorepo with Yarn 2 - Heroku Blog
Yarn 2 is officially supported by Heroku. Here's a popular use case for Yarn enhanced by Yarn 2: using workspaces to manage 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 FreeTop 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
Top GitHub Comments
When can we expect this in release?
Nice implementation. I hope this issue resolves as fast as possible.