Reputation: 6606
I am getting the following error but only when I try to use the following dependency, otherwise it works fine.
Error:
Module build failed: Error: Couldn't find preset "stage-0" relative to directory
Import causing the issue
import {ActionDone} from "material-ui"
It is part of the react-material-icons npm package. If I remove that import and uses of it everything works fine. What am I missing?
Upvotes: 3
Views: 6189
Reputation: 33
Reinstall babel using command
npm i --save-dev babel-preset-stage-0
Upvotes: 1
Reputation: 1077
You only need to install babel-preset-stage-0:
Command for this:
npm install --save-dev babel-preset-stage-0
Upvotes: 7
Reputation: 187
Try installing the stage 0 preset.
Refer to this article: https://babeljs.io/docs/plugins/preset-stage-0/
Upvotes: 2