求教:引擎定制工作流程 npm install 出错了。

creator 3.7.1

npm WARN deprecated source-map-resolve@0.5.2: See https://github.com/lydell/source-map-resolve#deprecated

npm WARN deprecated ecstatic@3.3.2: This package is unmaintained and deprecated. See the GH Issue 259.

npm ERR! code 2

npm ERR! path /Users/mac/work/qunying/client/engine/3.7.1/engine/scripts/typedoc-plugin

npm ERR! command failed

npm ERR! command sh -c npm run build

npm ERR! > typedoc-plugin-cc@1.0.0 build

npm ERR! > tsc

npm ERR!

npm ERR! error TS2688: Cannot find type definition file for ‘systemjs’.

npm ERR! The file is in the program because:

npm ERR! Entry point for implicit type library ‘systemjs’

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/mac/.npm/_logs/2023-03-13T12_29_35_225Z-debug-0.log

mac@macdeMac-mini engine %

mac m2.
node.js 版本 v19.7.0

大佬们帮忙看一下啊。为啥子呢?

是不是nodejs版本太新了

嗯,应该是和nodejs 的版本有关系,因为我更改了版本后,错误也不一样了。
当前版本 npm : 6.14.18
当前版本 nodejs : v14.21.3.
现在正在挨个版本尝试~

node 14,16,18,19 都试过了,mac m2, mac inter7 也换了.还是不行。
官方大佬看到了请指教一下了,不然我就要直接更改bin文件了

package.jsonscripts.postinstall 里去掉 npm run install:typedoc-plugin

您好,lzmajs这个库能支持吗?导进来各种报错目前

依然存在问题,是不是 nvm 管理的 node npm 有问题


这里我已经删除了

小帅哥别跑支持一下lzma这个库呗

很奇怪,engine 仓库应该没有地方依赖 systemjs 才对
试试

git clean -xfd  # 先保存本地修改
npm i 

现在需要用lzma库解压缩arraybuffer,但是git上星最多的lzmajs通过npm安装后报错使用不了,直接导入lzma_worker.js为插件也不行,官方负责第三方模块的大佬能不能支持一下这块谢谢:blush:

定制工作暂时用 npm run bundle-adapter 执行了。还可以解决我的需求。

我也碰到这个问题了。答案是不要从编辑器自带的buildin引擎里面拷贝出来,那个编译有问题。从github上下的源码版本就没有这个问题