[LayaAirIDE 2.0]ide2.6.0beta编译报错:This syntax requires an imported helper but module 'tslib' cannot be found
环境win10 layaboxide 2.6.0 beta
已经全局安装typescript,命令行 tsc -v,输出Version 3.8.3
nodejs 12.16.1
编译报错:
semantic error TS2354: [31mThis syntax requires an imported helper but module 'tslib' cannot be found
定位到代码中是:
let { width, height } = Laya.stage;
mac上却没有问题,win10上却出问题了,求解?难道只支持ts2.x?不支持解析赋值语法?
已经全局安装typescript,命令行 tsc -v,输出Version 3.8.3
nodejs 12.16.1
编译报错:
semantic error TS2354: [31mThis syntax requires an imported helper but module 'tslib' cannot be found
定位到代码中是:
let { width, height } = Laya.stage;
mac上却没有问题,win10上却出问题了,求解?难道只支持ts2.x?不支持解析赋值语法?
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
135*****133
赞同来自:
http://ask.layabox.com/question/45491
李康
赞同来自:
{
"compilerOptions": {
"module": "es6",
"target": "es6",
"noEmitHelpers": false,
"sourceMap": true,
"removeComments": true,
"baseUrl": ".",
"paths": {
"tslib": [
"D:/Programs/LayaAirIDE/resources/app/node_modules/tslib/tslib.d.ts"
]
},
"lib": [
"esnext",
"dom",
"es2015.promise"
]
}
}