[LayaAirIDE 2.0]使用2.6引擎版本vscode开发不支持async await语法 编译出现提示缺少tslib错误
错误提示:This syntax requires an imported helper but module 'tslib' cannot be found
semantic error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.
at error (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup\dist\shared\node-entry.js:5400:30)
at throwPluginError (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup\dist\shared\node-entry.js:11878:12)
at Object.error (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup\dist\shared\node-entry.js:12912:24)
at Object.error (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup\dist\shared\node-entry.js:12081:38)
at RollupContext.error (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:17194:30)
at lodash_3 (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:24958:23)
at arrayEach (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:534:11)
at forEach (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:9360:14)
at printDiagnostics (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:24931:5)
at Object.transform (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:27373:17)
请问这个如何解决?
semantic error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.
at error (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup\dist\shared\node-entry.js:5400:30)
at throwPluginError (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup\dist\shared\node-entry.js:11878:12)
at Object.error (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup\dist\shared\node-entry.js:12912:24)
at Object.error (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup\dist\shared\node-entry.js:12081:38)
at RollupContext.error (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:17194:30)
at lodash_3 (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:24958:23)
at arrayEach (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:534:11)
at forEach (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:9360:14)
at printDiagnostics (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:24931:5)
at Object.transform (D:\Program Files\nodejs\node_global\npm\node_modules\layaair2-cmd\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:27373:17)
请问这个如何解决?
没有找到相关结果
已邀请:
要回复问题请先登录
3 个回复
Laya_z
赞同来自:
时间凉透了最初的悸动
赞同来自:
Chiuan
赞同来自:
我刚刚测试完,分享了一下解决方案可以看看。