[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)
 
请问这个如何解决?
QQ图片20200704110435.png
已邀请:

Laya_z

赞同来自:

参考一下这个修改试试https://ask.layabox.com/question/46597
npm install tslib就可以了

Chiuan

赞同来自:

http://ask.layabox.com/question/46949
 
我刚刚测试完,分享了一下解决方案可以看看。

要回复问题请先

商务合作
商务合作