我收到以下错误,但仅当我尝试使用以下依赖项时才会出现,否则它会正常工作。
错误:
Module build failed: Error: Couldn't find preset "stage-0" relative to directory
导致问题的导入
从“material-ui”导入 {ActionDone}
它是 react-material-icons npm 包的一部分。如果我删除该导入并使用它,一切正常。我错过了什么?
最佳答案
你只需要安装babel-preset-stage-0:
命令:
npm install --save-dev babel-preset-stage-0
关于node.js - 模块构建失败 : Error: Couldn't find preset "stage-0" relative to directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44751216/