解决BUG:Transforming async generator functions to the configured target environment (“es2015“) is not

作者 : admin 本文共384个字,预计阅读时间需要1分钟 发布时间: 2024-06-17 共1人阅读

解决BUG:Transforming async generator functions to the configured target environment (“es2015”) is not supported yet

创建VUE3+vite新项目时,npm run dev发生了以下错误:
解决BUG:Transforming async generator functions to the configured target environment (“es2015“) is not插图
翻译是:尚不支持将异步生成器函数转换为配置的目标环境 (“es2015”)。
网上说是esbuild版本太低了,需要target转换配置升级到2018等。
解决BUG:Transforming async generator functions to the configured target environment (“es2015“) is not插图(1)
检查代码,根据网上的少有案例,发现注释掉或者其他操作都没有效果。
仔细通读BUG发现是axios依赖出现的问题,去pakage找到axios版本:
解决BUG:Transforming async generator functions to the configured target environment (“es2015“) is not插图(2)
降低版本:
解决BUG:Transforming async generator functions to the configured target environment (“es2015“) is not插图(3)
重新npm install,结果成功了。
解决BUG:Transforming async generator functions to the configured target environment (“es2015“) is not插图(4)
这是一个笨方法解决的方案,如果对axios要求标准不严格的话可以这样解决。
这个问题的类型网上很少,所以发出来大家可以参考研究,如果有更好的解决方案可以交流一下。

本站无任何商业行为
个人在线分享 » 解决BUG:Transforming async generator functions to the configured target environment (“es2015“) is not
E-->