报错bundling failed: TypeError: E:\zhuhaiyun\rn\rn_taro_demo\rn_temp\index.js: this.setDynamic is not a function
将以下两个包更新为
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
-->
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/preset-env": "^7.5.5",
同时配置.babelrc文件为
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": ["last 2 versions"]
}
}
]
],
"plugins": ["@babel/plugin-transform-runtime"]
}
报错bundling failed: Error: Unable to resolve module `@babel/runtime/helpers/interopRequireDefault`
解决:
安装@babel/core和@babel/runtime
npm install --save-dev @babel/core
npm install --save-dev @babel/runtime