I get the following error when I trying to use babel.
Error: Couldn\'t find preset \"es2015\" relative to directory
webp
You need to have babel configured to use those presets. You can add this to your package.json
"babel": {
"presets": [
"es2015",
"react"
]
},
You can alternatively have a .babelrc
file.
https://babeljs.io/docs/usage/babelrc/
Try this
npm install babel-preset-es2015
npm install babel-preset-react
npm install babel --save-dev
This worked for me.