今日尝试自定义引擎,然后发现不改代码也会失败。
引擎自己编译自定义引擎失败后不做中断,到加载才报错,也不太能理解。
最后想到自己构建下试试 npm run build 然后发现
‘build-declarations’ errored after 14 s
Error: ENOENT: no such file or directory, copyfile ‘C:\Users\1\Work\cocos-engine@types\consts.d.ts’ -> ‘C:\Users\1\Work\cocos-engine\bin.declarations__before_bundle@types\consts.d.ts’
‘build’ errored after 14 s
猜测原因是:
3.8 cocos-engine的.gitignore里加了这个@types/consts.d.ts
但是 构建自定义引擎 依赖于这个文件。直接git clone拿不到这个文件。
居然没人发帖问过的么(
