Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Cannot build new image #8

Closed
inglesp opened this issue May 16, 2023 · 1 comment
Closed

Cannot build new image #8

inglesp opened this issue May 16, 2023 · 1 comment

Comments

@inglesp
Copy link
Contributor

inglesp commented May 16, 2023

Building a new image involves running jupyter lab build, but this fails with RuntimeError: npm dependencies failed to install.

Running locally, by:

I got the following error logs:

[LabBuildApp] Building in /root/.pyenv/versions/3.8.1/share/jupyter/lab
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Node v8.10.0

[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
[LabBuildApp] > node /root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/jupyterlab/staging/yarn.js install --non-interactive
[LabBuildApp] yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
warning plotlywidget > plotly.js > color-rgba > color-space > mumath@3.3.4: Redundant dependency in your project.
[3/5] Fetching packages...
error get-stream@6.0.1: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.10.0"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

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

[LabBuildApp]   File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

[LabBuildApp]   File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/jupyterlab/labapp.py", line 97, in start
    build(name=self.name, version=self.version,

[LabBuildApp]   File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/jupyterlab/commands.py", line 458, in build
    return handler.build(name=name, version=version, static_url=static_url,

[LabBuildApp]   File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/jupyterlab/commands.py", line 660, in build
    raise RuntimeError(msg)

[LabBuildApp] RuntimeError: npm dependencies failed to install

[LabBuildApp] Exiting application: JupyterLab
@samscotty
Copy link

@inglesp in case useful, installing a later version of Node.js worked for me: Expected version ">=10". Got "8.10.0".

I could get a successful build, running ./build.sh locally, by switching out this:

# Required to build extensions for jupyter
RUN apt-get install -y nodejs npm

to instead install v16 using a NodeSource PPA:

# Required to build extensions for jupyter
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs

Note the NodeSource nodejs package contains both the node binary and npm, so no need to install npm separately.

Or any other method to install later versions e.g., Node Version Manager (NVM).

@evansd evansd closed this as completed May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants