jupyterlab_json icon indicating copy to clipboard operation
jupyterlab_json copied to clipboard

0.20.0

Open gnestor opened this issue 7 years ago • 9 comments

  • Upgrade to jupyterlab@^0.20

gnestor avatar Apr 28 '17 14:04 gnestor

When trying to run

jupyter labextension link .

I am running to the following issue:

> npm install /home/cjh/work/source/jupyterlab_json/labextension
npm WARN install Couldn't install optional dependency: Unsupported
> npm run build
fatal: Not a git repository (or any parent up to mount point /home/cjh)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

npm ERR! Linux 4.4.0-66-generic
npm ERR! argv "/home/cjh/.nvm/versions/node/v5.4.1/bin/node" "/home/cjh/.nvm/versions/node/v5.4.1/bin/npm" "run" "build"
npm ERR! node v5.4.1
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! @jupyterlab/[email protected] build: `webpack`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @jupyterlab/[email protected] build script 'webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @jupyterlab/application-top package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack
npm ERR! You can get their info via:
npm ERR!     npm owner ls @jupyterlab/application-top
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/cjh/virtualenv/jupyterlab/share/jupyter/lab/npm-debug.log
Traceback (most recent call last):
  File "/home/cjh/virtualenv/jupyterlab/bin/jupyter-labextension", line 11, in <module>
    sys.exit(main())
  File "/home/cjh/virtualenv/jupyterlab/local/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/cjh/virtualenv/jupyterlab/local/lib/python3.5/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/home/cjh/virtualenv/jupyterlab/local/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 111, in start
    super(LabExtensionApp, self).start()
  File "/home/cjh/virtualenv/jupyterlab/local/lib/python3.5/site-packages/jupyter_core/application.py", line 256, in start
    self.subapp.start()
  File "/home/cjh/virtualenv/jupyterlab/local/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 54, in start
    build()
  File "/home/cjh/virtualenv/jupyterlab/local/lib/python3.5/site-packages/jupyterlab/commands.py", line 170, in build
    run(['npm', 'run', 'build'], cwd=root)
  File "/home/cjh/virtualenv/jupyterlab/local/lib/python3.5/site-packages/jupyterlab/commands.py", line 37, in run
    return check_output(cmd, **kwargs)
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 708, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['npm', 'run', 'build']' returned non-zero exit status 1

cjh1 avatar Apr 28 '17 18:04 cjh1

So I did a little more digging. If I install jupyterlab from git ( pip install -e . ) then the jupyter labextension link works.

cjh1 avatar May 03 '17 17:05 cjh1

@cjh1 JupyterLab 0.20.0 introduces a new extension system that allows extensions to be installed from npm using jupyter labextension install jupyterlab_json (jupyterlab_json is not published to npm so this won't work yet). Additionally, dev installs can be linked to JupyterLab using jupyter labextension install . inside the labextension directory. So make sure you have JupyterLab ^0.20.0 installed:

git fetch jupyterlab
git checkout v0.20.3

gnestor avatar May 03 '17 17:05 gnestor

@gnestor I am using the dev install. First I installed jupyterlab ^0.20.0 via pip and got the error above. However, if I install jupyterlab from a git repo the install works. It seem like the npm run build step is assuming that jupyterlab is in a repo, which is not the case when installed from pip.

cjh1 avatar May 03 '17 17:05 cjh1

[email protected] includes a patch that fixes this: https://github.com/jupyterlab/jupyterlab/pull/2100/

gnestor avatar May 03 '17 18:05 gnestor

pip is giving me [email protected]

cjh1 avatar May 03 '17 18:05 cjh1

:+1:

gnestor avatar May 03 '17 18:05 gnestor

jupyter labextension link fails with this pip installed version

cjh1 avatar May 03 '17 18:05 cjh1

🤔...

gnestor avatar May 04 '17 16:05 gnestor