gpt4 book ai didi

javascript - 尝试导入错误 : 'default' is not exported from '../assertThisInitialized/_index.mjs'

转载 作者:行者123 更新时间:2023-12-03 20:43:43 25 4
gpt4 key购买 nike

突然我的 react 是应用程序抛出这个错误

./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
Attempted import error: 'default' is not exported from '../assertThisInitialized/_index.mjs'.
早些时候它可以工作,但今天它抛出错误
包.json
"react": "^16.8.6",      
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"babel-loader": "^7",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"webpack": "^4.35.3",

最佳答案

尝试指定显式版本的 Babel 和 webpack
使用较旧版本的 Babel Runtime 7.12.13 或更早版本

关于javascript - 尝试导入错误 : 'default' is not exported from '../assertThisInitialized/_index.mjs' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66331991/

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