jtpio/jupyterlab-python-file

npm dependencies failed to install

gioarma opened this issue · 5 comments

I tried to install the extension from the command line and got:

RuntimeError: npm dependencies failed to install

Jupyter Lab version: 2.0.1
Operating system: macOS High Sierra

Here is the log file

Node v13.13.0

Yarn configuration loaded.
> /opt/anaconda3/bin/npm pack jupyterlab-python-file
npm notice 
npm notice 📦  jupyterlab-python-file@0.4.0
npm notice === Tarball Contents === 
npm notice 1.5kB LICENSE        
npm notice 0     style/index.css
npm notice 3.0kB lib/index.js   
npm notice 1.2kB package.json   
npm notice 790B  README.md      
npm notice 174B  lib/index.d.ts 
npm notice === Tarball Details === 
npm notice name:          jupyterlab-python-file                  
npm notice version:       0.4.0                                   
npm notice filename:      jupyterlab-python-file-0.4.0.tgz        
npm notice package size:  2.9 kB                                  
npm notice unpacked size: 6.7 kB                                  
npm notice shasum:        48b7e37febd9b18b6c4dc953573ae036c2cc1540
npm notice integrity:     sha512-bXQmX6xjGWfDY[...]KtULNuMSRXpaA==
npm notice total files:   6                                       
npm notice 
jupyterlab-python-file-0.4.0.tgz

Node v13.13.0

Yarn configuration loaded.
Building jupyterlab assets (build:prod:minimize)
> node /opt/anaconda3/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error Integrity check failed for "jupyter-matplotlib" (computed integrity doesn't match our records, got "sha512-cHvQJy7kreJzSGVs0VOGFKMm3Vg9+B8IGGp/p+edtvKfQGzv5KenWowSXl/59jmYyvwL29Wcr8lC6SnPy4jytA== sha1-d1ZbqFu394/HEbxyatFoDGoFeJw=")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

npm dependencies failed to install
Traceback (most recent call last):

  File "/opt/anaconda3/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/opt/anaconda3/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 105, in start
    command=command, app_options=app_options)

  File "/opt/anaconda3/lib/python3.7/site-packages/jupyterlab/commands.py", line 460, in build
    command=command, clean_staging=clean_staging)

  File "/opt/anaconda3/lib/python3.7/site-packages/jupyterlab/commands.py", line 652, in build
    raise RuntimeError(msg)

RuntimeError: npm dependencies failed to install

Exiting application: jupyter

jtpio commented

error Integrity check failed for "jupyter-matplotlib"

It looks like the issue comes from another extension.

Did you try to install the extension with jupyter labextension install jupyterlab-python-file?

What is the output of jupyter labextension list?

Yes I used jupyter labextension install jupyterlab-python-file.
If I run jupyter labextension list I get:

JupyterLab v2.0.1
Known labextensions:
   app dir: /opt/anaconda3/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        @jupyterlab/toc v3.0.0  enabled  OK
        @lckr/jupyterlab_variableinspector v0.5.0  enabled  OK
        @pyviz/jupyterlab_pyviz v1.0.0  enabled  OK
        jupyter-matplotlib v0.7.2  enabled  OK
        jupyterlab-python-file v0.4.0  enabled  OK

Build recommended, please run `jupyter lab build`:
    jupyterlab-python-file needs to be included in build

This is what I get if I run jupyter lab build:

*Jupyter Lab Build*
[LabBuildApp] JupyterLab 2.0.1 [LabBuildApp] Building in /opt/anaconda3/share/jupyter/lab [LabBuildApp] Building jupyterlab assets (build:prod:minimize) Build failed. Troubleshooting: If the build failed due to an out-of-memory error, you may be able to fix it by disabling the `dev_build` and/or `minimize` options.

If you are building via the jupyter lab build command, you can disable
these options like so:

jupyter lab build --dev-build=False --minimize=False

You can also disable these options for all JupyterLab builds by adding these
lines to a Jupyter config file named jupyter_config.py:

c.LabBuildApp.minimize = False
c.LabBuildApp.dev_build = False

If you don't already have a jupyter_config.py file, you can create one by
adding a blank file of that name to any of the Jupyter config directories.
The config directories can be listed by running:

jupyter --paths

Explanation:

  • dev-build: This option controls whether a dev or a more streamlined
    production build is used. This option will default to False (ie the
    production build) for most users. However, if you have any labextensions
    installed from local files, this option will instead default to True.
    Explicitly setting dev-build to False will ensure that the production
    build is used in all circumstances.

  • minimize: This option controls whether your JS bundle is minified
    during the Webpack build, which helps to improve JupyterLab's overall
    performance. However, the minifier plugin used by Webpack is very memory
    intensive, so turning it off may help the build finish successfully in
    low-memory environments.

An error occured.
RuntimeError: npm dependencies failed to install
See the log file for details: /var/folders/87/1q6mszb91qq42k6ltj_yzv380000gn/T/jupyterlab-debug-a_o2pn4w.log

jtpio commented

@gioarma would you be able to try with JupyterLab 3.0, which was released about a month ago?

With 3.0, this extension does not require NodeJS anymore, and can be installed with:

pip install jupyterlab-python-file
jtpio commented

Closing as answered.

Feel free to reopen a new issue if you have more questions!

Yes, now it works just fine!
Thanks