puerts icon indicating copy to clipboard operation
puerts copied to clipboard

TS类中使用了fs模块之后ts类损坏

Open fonlylovey opened this issue 2 years ago • 4 comments

TS类中import了fs模块

然后在类成员函数中使用任意fs模块的函数以后,会导致该类损坏,哪怕这个成员函数没有被调用 。

复现步骤 1.在c++类中通过TS类的UClass创建TS类对象 2.TS类从UObject继承,在类中使用任意fs模块

fonlylovey avatar Jul 14 '22 01:07 fonlylovey

有fs模块么? 没有的话,你这现象不就正常的么?

chexiongsheng avatar Jul 14 '22 01:07 chexiongsheng

好像是没有fs模块,装了fs-extra也是用不了

Evilom avatar Jul 26 '22 16:07 Evilom

fs是nodejs的扩展。不是js的标准库

chexiongsheng avatar Jul 27 '22 08:07 chexiongsheng

只能使用原生支持的TS模块对吧

VegetableWithChicken avatar Jul 29 '22 08:07 VegetableWithChicken