-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@parcel/fs tried to access @parcel/core (a peer dependency) but it isn't provided by its ancestors
error when following tutorial
#9114
Comments
can you give a reproduction link? https://codesandbox.io/ will be great |
I'm having the same issue.
triggers the problem. |
I made a codesanbox here: https://codesandbox.io/p/sandbox/zealous-https-z83pz3 |
please, add @parcel/core to your dev dependencies) And everything will work fine: link to reproduction - https://codesandbox.io/p/sandbox/gallant-haze-t9qjqh?file=%2Fsrc%2Findex.html%3A10%2C13 Also i would recommend to add index.html to src/ folder 🙂 |
I'm a simple dev like you, i don't have permision to edit docs 🙂
I see that parcel in your dependencies is not similar with @parcel/ packages, maybe this is an issue) |
Ah it's just the leftover of me trying to see if it's a recent parcel change. The behavior are the same on the lastest version. |
Thanks for all the feedback. 🙏 This does seem to be a real issue with following the docs with Yarn then. 🤔 (I ended up skipping Parcel for my (very simple, rudimentary) project. I detest Node.js anyway. 😉 🙈) |
In conclusion to this, i think Parcel need to update docs to install @parcel/core in dev dependencies too) |
As I said, it doesn't solve the issue on larger projects. |
FYI, Yarn's own E2Es are also broken because of this: https://github.com/yarnpkg/berry/actions/runs/5794322982/job/15703692932 |
I agree that the proper solution is to fix the dependencies in the corresponding packages. What you can do as a workaround is to use yarn's package extension mechanism, e.g. by putting something like the following into your packageExtensions:
"@parcel/node-resolver-core@*":
dependencies:
"@parcel/core": 2.9.3 For projects with multiple workspaces, this applies the extensions to all of them. You might need to add ➤ YN0002: │ @parcel/types@npm:2.9.3 doesn't provide @parcel/core (pf46c3), requested by @parcel/fs
➤ YN0002: │ @parcel/types@npm:2.9.3 doesn't provide @parcel/core (p16f90), requested by @parcel/workers
➤ YN0002: │ @parcel/types@npm:2.9.3 doesn't provide @parcel/core (p385c8), requested by @parcel/cache
➤ YN0002: │ @parcel/types@npm:2.9.3 doesn't provide @parcel/core (p76fb9), requested by @parcel/package-manager |
Any progress on this? I'm stuck.
No luck. |
@olivier-spinelli Sorry to hear that. What's the error you're seeing, the same as in my original issue description? |
Sorry for the delayed answer. |
[TEMP SOLUTION] I had to create .yarnrc.yml file in the root of my project and add the following in it: packageExtensions:
"@parcel/node-resolver-core@*":
dependencies:
"@parcel/core": 2.9.3
"@parcel/types@*":
dependencies:
"@parcel/core": 2.9.3
"@parcel/fs@*":
dependencies:
"@parcel/core": 2.9.3 Save file and run My package.js devDependencies looks like this now (ignore the packager-raw-url, transformer-webmanifest):
Everything works now. Hope it helps someone. |
In my case I don't have this issue after switching to |
Just preventing the Bot from closing this issue. |
🐛 bug report
Following the general tutorial at https://parceljs.org/getting-started/webapp/ gives me the error below when trying to run
yarn parcel src/index.html
.The
yarn add
step worked fine and addedparcel
properly to the mypackage.json
.🎛 Configuration (.babelrc, package.json, cli command)
package.json
I don't have any
.babelrc
AFAICT.🤔 Expected Behavior
The app should be built and the devserver should be started.
😯 Current Behavior
💻 Code Sample
N/A at the moment, but can be provided if needed.
🌍 Your Environment
asdf
The text was updated successfully, but these errors were encountered: