Duplicate plugin/preset detected after configuring Babel for Parcel
bratnick opened this issue · 6 comments
I'm getting this error as well. I would love some assistance as this course has been great so far!
Here's a link to my repo, everything's been done on the master branch so far: https://github.com/danfrenette/frontend-masters-beginner-react
Edit: I was able to reproduce this in the course repo (this repo) as well.
- Clone the app
git reset --hard a69f25dfed3172d0f51c718ae0b2beee4a6a6906
(this commit)yarn
npm run dev
However, if you repeat those steps for the commit directly before the one I linked, the server builds. I've found some information on this in threads like this one, but every solution involves a change to the given project's webpack config, but obviously that doesn't apply here. Is there a similar fix for parcel?
@danfrenette , did the solution for #93 work for you?
Its not working for me.
@btholt , it'd be appreciated if you could help us out here !
@bratnick Okay I just figured it out (and by "figured it out" I mean I noticed the "Debugging" section of the README 🤦 )
You have to remove the cache that parcel uses after you follow the instructions in the other issue. So in full order, that's:
- Remove the line
"plugins": ["@babel/plugin-proposal-class-properties"]
from your.babelrc
file - Run
rm -rf .cache/ dist/
in the root directory of the project. I also removed the node modules at this point, but that might not be necessary (rm -rf node_modules
). - Run
yarn
to get all your packages back. - Run
npm run dev
and hopefully your project should be back online. You can confirm the issue was fixed if your linter isn't complaining about thestate
var being set in thesrc/Details.js
file.
I hope this helps!
It looks like this issue has been solved! Closing this. Please reopen if there are further issues.
@bratnick Okay I just figured it out (and by "figured it out" I mean I noticed the "Debugging" section of the README 🤦 )
You have to remove the cache that parcel uses after you follow the instructions in the other issue. So in full order, that's:
- Remove the line
"plugins": ["@babel/plugin-proposal-class-properties"]
from your.babelrc
file- Run
rm -rf .cache/ dist/
in the root directory of the project. I also removed the node modules at this point, but that might not be necessary (rm -rf node_modules
).- Run
yarn
to get all your packages back.- Run
npm run dev
and hopefully your project should be back online. You can confirm the issue was fixed if your linter isn't complaining about thestate
var being set in thesrc/Details.js
file.I hope this helps!
But for rm -rf .cache/ dist/,it says,
Invalid switch - "dist".