gpt4 book ai didi

babeljs - babel-preset-es2015 中指定的插件 0 提供了无效的 _c 属性

转载 作者:行者123 更新时间:2023-12-03 23:47:37 28 4
gpt4 key购买 nike

使用以下配置获得上述错误,但是注释 passPerPreset 会消除错误。是否缺少任何配置?

.babelrc :

{
"passPerPreset": true,
"presets": [{
"plugins": [
"./build/babelRelayPlugin",
"transform-runtime",
"transform-es2015-classes"
]
}, "es2015", "stage-0", "react"],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}

包.json :
"babel-cli": "^6.5.1",
"babel-core": "^6.5.2",
"babel-eslint": "^4.1.8",
"babel-loader": "^6.2.2",
"babel-plugin-react-transform": "^2.0.0",
"babel-plugin-transform-es2015-classes": "^6.5.2",
"babel-plugin-transform-runtime": "^6.5.2",
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.0",
"babel-preset-stage-0": "^6.5.0",
"babel-relay-plugin": "^0.7.0",
"babel-runtime": "^6.5.0",

网络包:
module: {
loaders: [
{
loader: "babel-loader",
include: [
path.resolve(__dirname, "app"),
],
test: /\.jsx?$/,
query: {
plugins: ['transform-runtime'],
presets: ['react', 'es2015', 'stage-0'],
}
},
]

},

错误:babel-node 启动
Module build failed: Error: Plugin 0 specified in "/Users/my/demo/node_modules/babel-preset-es2015/index.js" provided an invalid property of "_c"

最佳答案

对我有用的是:

rm -rf node_modules
npm prune
npm cache clear
npm cache clean
npm i

关于babeljs - babel-preset-es2015 中指定的插件 0 提供了无效的 _c 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35395881/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com