jupyterlab-code-snippets
jupyterlab-code-snippets copied to clipboard
the extension could not be installed
Describe the bug The extension could not be installed.
To Reproduce Steps to reproduce the behavior:
- Go to extension file folder
- run
npm install
- the conflict of npm packages is shown
Expected behavior code-snippets extension is successfully built.
Screenshots
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
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
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 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](https://user-images.githubusercontent.com/82988/180412103-7506ef12-006d-46ce-9235-8544cc3994c3.png)
@psychemedia, adding "id": 0,
to the first snippet indeed fixes the issue. Well spotted!