Open joaorsfonseca opened 5 years ago
Error: .plugins[3][2] must be a string, or undefined
It seems that there is other babel configuration file in your project, could you attach the contents of .babelrc
or babel.config.js
? And you can looking through the item .plugins[3][2]
.
I do not have babel.config.js. I've zipped .babelrs, webpack.config.js and webpack.config.production.js
Thank you!!
The .plugins[3]
in your .babelrc
is
["babel-plugin-root-import", {
"rootPathSuffix": "src",
"rootPathPrefix": "@"
}, {
"rootPathSuffix": "/",
"rootPathPrefix": "~"
}]
so the .plugins[3][2]
is
{
"rootPathSuffix": "/",
"rootPathPrefix": "~"
}
It is not a valid configuration and please refer the documents of babel-plugin-root-import.
@JLHwung thanks!!
i'm now having a missing module error.. ERROR in ./src/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-plugin-transform-object-assign' from 'C:_TFS\EP\ConnectorV2\Dev\Connector.UI'
I've already updated react-hot-loader to the lateste version installed @babel/plugin-transform-object-assign.. What am i missing?
Thanks once again..
@babel/plugin-transform-object-assign
is a babel 7 plugin, if you are upgrading babel 6 to babel 7, not that some package is renamed and you have to revise your .babelrc
accordingly, see https://babeljs.io/docs/en/v7-migration#scoped-packages
Protip: It is an etiquette to wrap error log in three apostrophes ```
, which helps people to tell error/code from plain text.
I've uninstalled all the babel packages and install the new ones using this command:
And i'm still getting compilation errors.
My webbpack.config.js file:
Thanks.