标签:解决 ror tps error npm load ati pac set
Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module ‘babel-preset-env‘ from ‘...‘ - Did you mean "@babel/env"?
npm install babel-loader babel-core babel-preset-env --save-dev
npm install babel-loader @babel/core @babel/preset-env --save-dev
env
替换为@babel/preset-env
// .babelrc
{
"presets": [
["env",
{
"modules": false
}
]
]
}
// webpack.config.js
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: ‘babel-loader‘,
options: {
presets: [‘env‘, { modules: false }]
}
}
}
]
}
标签:解决 ror tps error npm load ati pac set
原文地址:https://www.cnblogs.com/cag2050/p/10087554.html