Sunday, 20 September 2020

JupyterLab plotly extension error: Cannot find module jupyter\lab\staging\node_modules\ejs\postinstall.js

I am trying to install JupyterLab renderer support for Plotly using:

jupyter labextension install jupyterlab-plotly@4.10.0

and I get

RuntimeError: npm dependencies failed to install

The log file contains the following:

[LabBuildApp] Building in C:\Users\<user>\anaconda3\share\jupyter\lab
[LabBuildApp] Node v14.11.0

[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
[LabBuildApp] > node C:\Users\<user>\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js install --non-interactive
[LabBuildApp] yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.1.3: The platform "win32" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > @lumino/coreutils@1.5.0" has unmet peer dependency "crypto@1.0.1".
[5/5] Building fresh packages...
error C:\Users\<user>\anaconda3\share\jupyter\lab\staging\node_modules\ejs: Command failed.
Exit code: 1
Command: node ./postinstall.js
Arguments: 
Directory: C:\Users\<user>\anaconda3\share\jupyter\lab\staging\node_modules\ejs
Output:
internal/modules/cjs/loader.js:896
  throw err;
  ^

Error: Cannot find module 'C:\Users\<user>\anaconda3\share\jupyter\lab\staging\node_modules\ejs\postinstall.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:893:15)
    at Function.Module._load (internal/modules/cjs/loader.js:743:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
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 "C:\Users\<user>\anaconda3\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
    yield

[LabBuildApp]   File "C:\Users\<user>\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 138, in start
    raise e

[LabBuildApp]   File "C:\Users\<user>\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 134, in start
    build(name=self.name, version=self.version,

[LabBuildApp]   File "C:\Users\<user>\anaconda3\lib\site-packages\jupyterlab\commands.py", line 459, in build
    return handler.build(name=name, version=version, static_url=static_url,

[LabBuildApp]   File "C:\Users\<user>\anaconda3\lib\site-packages\jupyterlab\commands.py", line 652, in build
    raise RuntimeError(msg)

[LabBuildApp] RuntimeError: npm dependencies failed to install

[LabBuildApp] Exiting application: JupyterLab

When I open JupyterLab I am asked to do a

jupyter lab build

After my attempt, I get the same error in the logfile.

I am using Windows10, node.js 14.11.0 (installed using conda), JupyterLab 2.1.5

Note that I have tried:

  • uninstalling conda's node.js and installing node.js directly from node-v12.18.3-x64.msi
  • uninstalling and installing Anaconda

both with no luck.



from JupyterLab plotly extension error: Cannot find module jupyter\lab\staging\node_modules\ejs\postinstall.js

No comments:

Post a Comment