I am following along with this webpack4/react tutorial:
https://www.youtube.com/watch?v=deyxI-6C2u4
I have followed it exactly up until the part where he runs np
In my case I had to uninstall babel 6
npm uninstall --save-dev babel-cli babel-core babel-polyfill babel-preset-es2015 babel-preset-stage-2 babel-register
and then reinstall babel 7
npm i --save-dev @babel/cli @babel/core @babel/node @babel/polyfill @babel/preset-env
and it worked for me.
I am able to fix this issue using below command
npm install @babel/core --save
Go in by running on Windows, %USERPROFILE%\.quokka
The ~/.quokka
configuration is limited to the config.json
file and any packages that exist in ~/quokka/node_modules
.
Put the following into config.js
,
{
"pro":true,
"babel": {
"presets": ["@babel/preset-env", " @babel/preset-react"],
"plugins": [
["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
]
}
}
babel-loader@8 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'.
try to install npm install @babel/core --save if it does not work try to uninstall node_modules and reinstall
I've been dealing with this problem for a few hours and it mysteriously disappeared when I added a "devDependencies" section to my package.json file and moved the @types dependencies to it.