npm 安装后 JupyterLab 扩展 blueprintjs/core 类型问题

JupyterLab Extension blueprintjs/core type issue after npm install

  1. 制作了 JLab 扩展并保存到 Git。
  2. 创建了新环境并成功运行。确认它对朋友也有效。
  3. 然后向其添加一个新的 React 对象并在新分支中保存回 Git。
  4. 接下来创建一个新环境并提取该代码 returns 在 npm 更新和 npm 安装之后出现以下 blueprintjs/core 问题。
  5. 然后在第 3 个新环境中,运行 没有反应对象的原始代码现在也 returns 同样的问题,尽管它是干净的。
npm ERR! yarn run v1.21.1
npm ERR! $ jlpm run clean:lib
npm ERR! $ rimraf lib tsconfig.tsbuildinfo
npm ERR! Done in 3.19s
npm ERR! yarn run v1.21.1
npm ERR! $ jlpm run build:lib
npm ERR! tsc
npm ERR! ../node_modules/@blueprintjs/core/lib/esm/components/resize-sensor/resizeObserverTypes.d.ts(2,8): error TS2300: Duplicate identifier 'type'.
npm ERR! ../node_modules/@blueprintjs/core/lib/esm/components/resize-sensor/resizeObserverTypes.d.ts(2,13): error TS1005: '=' expected.
npm ERR! ../node_modules/@blueprintjs/core/lib/esm/components/resize-sensor/resizeObserverTypes.d.ts(2,15): error TS2304: Cannot find name 'ResizeObserverEntry'
npm ERR! ../node_modules/@blueprintjs/core/lib/esm/components/resize-sensor/resizeObserverTypes.d.ts(2,37): error TS2304L Cannot find name 'from'.
npm ERR! ../node_modules/@blueprintjs/core/lib/esm/components/resize-sensor/resizeObserverTypes.d.ts(2,42):  error TS1005: ';' expected.
5 more lines

注意 - 我没有使用 blueprintjs/core 中的任何方法,但据我所知,它会自动安装 npm 以对 JupyterLab 进行扩展,所以不确定为什么会这样。我尝试了 运行 旧版本的 NPM、新版本的@jupyterlab 包、特定的旧版本 @blueprintjs/core,但似乎没有任何效果。请指教

我是 运行 @jupyterlab/application=^3.0.0@jupyterlab/settingregistry=^3.0.0@jupyerlab/notebook=^3.0.0typescript=~3.7.5.

的 Jupyter 版本

预计它会正确安装 npm,这样我就可以在本地构建和安装我的扩展程序。

问题是我的打字稿版本已经过时了。正在使用 ~3.7 而此版本的 blueprintjs/core 需要 3.8+