problem with babel
alicja1bobko opened this issue · 2 comments
Hi! (sorry for my english)
Here am I doing this course in 2020. In video you are mentioning that in 2019 or 2020 class components will be handeled the way easier on default, but in the video you use babel. My code worked fine as I followed your video, but after intalling babel it crashes and I don't know what went wrong. Do we still need to install babel package? Can I fix this somehow?
I have an error:
Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.
plugins: [
['some-plugin', {}],
['some-plugin', {}, 'some unique name'],
]
Duplicates detected are:
[
{
"alias": "C:\Users\barto\Desktop\VS\React\adopt_me\node_modules\@babel\plugin-proposal-class-properties\lib\index.js",
"dirname": "C:\Users\barto\Desktop\VS\React\adopt_me",
"ownPass": false,
"file": {
"request": "@babel/plugin-proposal-class-properties",
"resolved": "C:\Users\barto\Desktop\VS\React\adopt_me\node_modules\@babel\plugin-proposal-class-properties\lib\index.js"
}
},
{
"alias": "base$2",
"options": {
"spec": false,
"loose": false,
"useBuiltIns": true
},
"dirname": "C:\Users\barto\Desktop\VS\React\adopt_me",
"ownPass": false
}
]
Hi!
I faced the same issue. It's showing that plugin-proposal-class-properties
is duplicated.
You can fix this in 2 ways:
- Remove
@babel/plugin-proposal-class-properties
from the plugins list in.babelrc
. - Add a name to the class properties plugin like so:
"plugins": [["@babel/plugin-proposal-class-properties", {}, "name"]]
This repo tracks the development of the class fields proposal. It is mentions that they are enabled by default in the latest versions of chrome.
Versions used:
- @babel/core - 7.10.1
- chrome - 80.0.3987.149
- parcel - 1.12.4
- react - 16.13.1
It looks like this has been solved! Closing this issue. Please reopen if there are further problems or questions with this.