Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: JupyterLab failed to build - without error message #13004

Closed
ZelphirKaltstahl opened this issue Aug 25, 2022 · 1 comment
Closed
Labels
bug status:Needs Triage Applied to new issues that need triage

Comments

@ZelphirKaltstahl
Copy link

Description

Documenting it for people running into this issue.

Reproduce

(This is an example of how to get the error. Not generally the only way to get it.)

  1. Install JupyterLab 3.1.13, a now old version.
  2. Use NodeJS 17.x.y. (fr example via nvm install 17 and nvm use 17)
  3. Build your extension. (usually involves calling tsc for the TypeScript sources to create JS sources)
  4. Run jupyter labextension install . in the extension directory.

Expected behavior

JupyterLab warns about incompatible NodeJS version.

Actual behavior

$ jupyter labextension install .
Building jupyterlab assets (development)
An error occurred.
RuntimeError: JupyterLab failed to build
See the log file for details:  /tmp/jupyterlab-debug-mfatr5lb.log  # or similarly named file

However, the log file is empty.

Context

The reason this happens is, that JupyterLab relies on Webpack, which relies on a Hash function, which seems to be relocated or gone in NodeJS 17.

This can be found out using the following commands:

jupyter lab clean
jupyter lab build --minimize=False --dev-build=False
# This will give another log file for the error:
...
An error occurred.
RuntimeError: JupyterLab failed to build
See the log file for details:  /tmp/jupyterlab-debug-59rslxx1.log

Which then has an error:

$ webpack --config webpack.prod.config.js
node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at BulkUpdateDecorator.hashFactory
# ...
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Aug 25, 2022
@JasonWeill
Copy link
Contributor

Node 17 incompatibility has been noted here: #11359

This was fixed in master (4.0) in #12350, but older versions are still not compatible, and we're not planning to make them compatible with newer Nodes.

As noted in #11359, the long-term support (LTS) version of Node should be more compatible with JupyterLab. I had success running nvm to switch to Node 14 for the purposes of building JupyterLab 3. Node 14 remains in LTS until 2023-04-30.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug status:Needs Triage Applied to new issues that need triage
Projects
None yet
Development

No branches or pull requests

2 participants