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

installation error: doesn't support current version of Jupyterlab

Open cocoaaa opened this issue 6 years ago • 8 comments

Hi, thank you for creating this extension. I'm getting this error message saying "This extension does not yet support the current version of Jupyterlab". Could you advise me what to do?

image

I'm currently useing jupyterlab 0.35.4 (py36_0) installed from conda-forge. image

Thanks!

cocoaaa avatar Feb 14 '19 06:02 cocoaaa

me too :(

up2young avatar Mar 06 '19 04:03 up2young

@up2young I found an updated version under the Pull Requests, and was able to clone that repo and build it. Hope it works for you.

cocoaaa avatar Mar 10 '19 06:03 cocoaaa

The extension works fine for me after changing the dependencies in package.json. There is a pull request waiting with similar changes.

"dependencies": {
    "@jupyterlab/application": "^0.19",
    "@jupyterlab/coreutils": "^2.0.0-1",
    "@jupyterlab/filebrowser": "^0.19",
    "@jupyterlab/notebook": "^0.19",
    "@jupyterlab/services": "^3.0.0-1",
    "@phosphor/widgets": "^1.6.0"
  },

Using the ^ in npm dependencies works differently for 0.x releases, so this package would then be limited to version 0.19.x.

Allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple. In other words, this allows patch and minor updates for versions 1.0.0 and above, patch updates for versions 0.X >=0.1.0, and no updates for versions 0.0.X

Personally I think "^0.19" is too conservative, and would suggest matching "0.x" as they are in theory intended to be backwards compatible.

a1650078 avatar Mar 10 '19 07:03 a1650078

@cocoaaa thanks, but how to use the new version? I'm a novice.

up2young avatar Mar 20 '19 03:03 up2young

@up2young, here is what worked for me.

  1. Clone this repo
  2. Go to the repo directory and follow these steps: image

Hope this works for you.

cocoaaa avatar Mar 22 '19 19:03 cocoaaa

In the latest jupyter-lab version this does not work either,

however changing the depenencies in package.json as suggested by @a1650078 works out of the box when we change them to the following:

"dependencies": {
    "@jupyterlab/application": "^1.0.1",
    "@jupyterlab/coreutils": "^3.0.0",
    "@jupyterlab/filebrowser": "^1.0.1",
    "@jupyterlab/notebook": "^1.0.1",
    "@jupyterlab/services": "^4.0.1",
    "@phosphor/widgets": "^1.6.0"
  }

and generally following the workflow suggested by @cocoaaa :)

Magnusgaertner avatar Aug 08 '19 16:08 Magnusgaertner

@Magnusgaertner I'd be happy to accept a PR

Bamieh avatar Aug 14 '19 13:08 Bamieh

<Update on installing this extension with jupyter-lab 1.1.0>

I recently updated jupyterlab to version 1.1.0 and had another dependency conflicts. I'm not very familiar with packaging and npm installation process, so there must be a more proper way to resolve this conflict by updating the package.json file. In the meantime, if anyone wants a quick fix, here is what I did to install this extension on jupterlab 1.1.0:

  1. Clone this repo
  2. cd to the directory of your local cloned repo
  3. run npm install (without changing anything in the package.json file)
  4. run npm run build
  5. Try jupyter labextension link . If you get an error about conflicting dependencies like this: image

Change the package.json's "dependencies" field to what matches in the error message (eg. change to the leftmost column's version numbers). For example, I had to update the field to:

  "dependencies": {
    "@jupyterlab/application": "^1.1",
    "@jupyterlab/coreutils": "^3.1",
    "@jupyterlab/filebrowser": "^1.1",
    "@jupyterlab/notebook": "^1.1",
    "@jupyterlab/services": "^4.1",
    "@phosphor/widgets": "^1.6.0"
  },
  1. Run jupyter labextension link .
  2. Rebuild jupyter-lab: jupyter lab build

For some reason, if I use update the dependency versions before running npm install, I get this error:

node_modules/@jupyterlab/ui-components/lib/icon/iconregistry.d.ts:1:8 - error TS1192: Module '"/Users/hayley/miniconda3/share/jupyter/lab/manual_extensions/jupyterlab-clipboard/node_modules/@types/react/index"' has no default export.

1 import React from 'react';
         ~~~~~

node_modules/@jupyterlab/ui-components/lib/icon/interfaces.d.ts:3:8 - error TS1192: Module '"/Users/hayley/miniconda3/share/jupyter/lab/manual_extensions/jupyterlab-clipboard/node_modules/@types/react/index"' has no default export.

3 import React from 'react';
         ~~~~~

src/index.ts:3:3 - error TS2305: Module '"/Users/hayley/miniconda3/share/jupyter/lab/manual_extensions/jupyterlab-clipboard/node_modules/@jupyterlab/application/lib/index"' has no exported member 'JupyterLabPlugin'.

3   JupyterLabPlugin,
    ~~~~~~~~~~~~~~~~

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublish: `yarn clean && yarn build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

So, I had to use the original package.json until I got the dependencies conflicts. Hope this helps.

cocoaaa avatar Sep 21 '19 00:09 cocoaaa