jupyterlab-code-snippets icon indicating copy to clipboard operation
jupyterlab-code-snippets copied to clipboard

the extension could not be installed

Open Betristor opened this issue 2 years ago • 4 comments

Describe the bug The extension could not be installed.

To Reproduce Steps to reproduce the behavior:

  1. Go to extension file folder
  2. run npm install
  3. the conflict of npm packages is shown

Expected behavior code-snippets extension is successfully built.

Screenshots image image

Desktop (please complete the following information):

  • OS: MacOS Monterey 12.3
  • Browser chrome

Additional context Log from npm

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^7.5.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0 || ^6.0.0" from @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   dev @typescript-eslint/parser@"^2.27.0" from the root project
npm ERR!   peer @typescript-eslint/parser@"^2.0.0" from @typescript-eslint/[email protected]
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     dev @typescript-eslint/eslint-plugin@"^2.27.0" from the root project

Betristor avatar Mar 31 '22 09:03 Betristor

Similar problem on Linux. There we get:

  $ tsc
      src/index.ts(298,14): error TS2322: Type 'Token<ISettingRegistry>' is not assignable to type 'Token<any>'.
        Types have separate declarations of a private property '_tokenStructuralPropertyT'.
      error Command failed with exit code 1.
      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
      error Command failed with exit code 1.
      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
      error Command failed with exit code 1.
      info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
      Traceback (most recent call last):

during pip install

grisuthedragon avatar Jun 09 '22 07:06 grisuthedragon

I can successfully install it using pip on OSX, but encounter similar problem that it has no contents. I found this could be caused by the error in its default snippets, and it works after clean the default snippets in the Advanced Settings Editor.

hhhuang18 avatar Jul 22 '22 02:07 hhhuang18

@hhhuang18 Looking at the system defaults snippet, the id attribute of the first snippet is missing, which may be the problem?

The attribute does appear in the definition file in the codebase (eg https://github.com/jupytercalpoly/jupyterlab-code-snippets/blob/5713c63aad30f4adeea99f1bddb26646f020d05b/schema/snippets.json#L45 ) but not in the system default file when the extension is installed:

image

psychemedia avatar Jul 22 '22 09:07 psychemedia

@psychemedia, adding "id": 0, to the first snippet indeed fixes the issue. Well spotted!

dcervenkov avatar Aug 17 '22 11:08 dcervenkov