简体   繁体   中英

JupyterLab Extension blueprintjs/core type issue after npm install

  1. Made a JLab extension and saved to Git.
  2. Created new environment and pulling it works. Confirmed it worked for a friend too.
  3. Then just added a new react object to it and saved back to Git in a new branch.
  4. Next creating yet a new environment and pulling that code returns the following blueprintjs/core issue after npm update and npm installing.
  5. Then on a 3rd new environment, running the original code without the react object now also returns the same issues despite it being clean.
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

NOTE - I don't use any method from blueprintjs/core but it gets npm installed automatically to make a JupyterLab extension to my knowledge, so not sure why this is happening. I tried running older versions of NPM, newer versions of @jupyterlab packages, a specific older version of @blueprintjs/core , and nothing seems to work. Please advise.

Version of Jupyter I'm running @jupyterlab/application=^3.0.0 , @jupyterlab/settingregistry=^3.0.0 , and @jupyerlab/notebook=^3.0.0 and typescript=~3.7.5 .

Was expected it to npm install correctly so I could then build and install my extension locally.

Problem was that my version of typescript was obsolete. Was using ~3.7 and this version of blueprintjs/core needs 3.8+

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM