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

jupyter lab build does not work with 2.0.0b1 #7689

Closed
jasongrout opened this issue Dec 24, 2019 · 2 comments · Fixed by #7699
Closed

jupyter lab build does not work with 2.0.0b1 #7689

jasongrout opened this issue Dec 24, 2019 · 2 comments · Fixed by #7699
Labels
status:resolved-locked
Milestone

Comments

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Dec 24, 2019

Description

jupyter lab build fails with JupyterLab 2.0.0b1. This also prevents the conda-forge build from succeeding.

Reproduce

  1. Install jupyterlab 2.0.0b1
  2. run jupyter lab build

We get ModuleNotFoundError: Module not found: Error: Can't resolve 'vega-embed' in '/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/@jupyterlab/vega5-extension/lib'

Expected behavior

Context

  • Operating System and version: macOS
  • JupyterLab version: 2.0.0b1
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
[LabBuildApp] Building in /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Node v13.0.0

[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
[LabBuildApp] > node /[[snip]]/miniconda3/envs/jlab2b1pip/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...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > @jupyterlab/ui-components@2.0.0-beta.1" has incorrect peer dependency "react@~16.8.4".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 12.63s.

[LabBuildApp] > node /[snip]/miniconda3/envs/jlab2b1pip/lib/python3.8/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer
[LabBuildApp] yarn run v1.15.2
$ /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer
Done in 1.06s.

[LabBuildApp] > node /[snip]/miniconda3/envs/jlab2b1pip/lib/python3.8/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
[LabBuildApp] yarn run v1.15.2
$ webpack --config webpack.prod.minimize.config.js
ModuleNotFoundError: Module not found: Error: Can't resolve 'vega-embed' in '/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/@jupyterlab/vega5-extension/lib'
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/webpack/lib/Compilation.js:925:10
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:401:22
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:130:21
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:224:22
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/neo-async/async.js:2830:7
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/neo-async/async.js:6877:13
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:214:25
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:184:12
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :25:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :26:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:23:37
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/forEachBail.js:30:14
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :14:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :14:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), :14:1)
at /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
resolve 'vega-embed' in '/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/@jupyterlab/vega5-extension/lib'
Parsed request is a module
using description file: /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/@jupyterlab/vega5-extension/package.json (relative path: ./lib)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/@jupyterlab/vega5-extension/lib/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/@jupyterlab/vega5-extension/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/@jupyterlab/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/envs/jlab2b1pip/share/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/envs/jlab2b1pip/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/envs/node_modules doesn't exist or is not a directory
/[snip]/miniconda3/node_modules doesn't exist or is not a directory
/Users/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules
using description file: /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
looking for modules in /[snip]/node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
using description file: /[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/package.json (relative path: ./node_modules/vega-embed)
no extension
Field 'browser' doesn't contain a valid alias configuration
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/vega-embed doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/vega-embed.wasm doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
No description file found
no extension
Field 'browser' doesn't contain a valid alias configuration
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/vega-embed.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/[snip]/node_modules/vega-embed doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/vega-embed.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/[snip]/node_modules/vega-embed.wasm doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/vega-embed.json doesn't exist
/[snip]/node_modules/vega-embed.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
as directory
/[snip]/miniconda3/envs/jlab2b1pip/share/jupyter/lab/staging/node_modules/vega-embed doesn't exist
/[snip]/node_modules/vega-embed.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/[snip]/node_modules/vega-embed.json doesn't exist
as directory
/[snip]/node_modules/vega-embed doesn't exist
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

[LabBuildApp] JupyterLab failed to build
[LabBuildApp] Traceback (most recent call last):

[LabBuildApp] File "/[snip]/miniconda3/envs/jlab2b1pip/lib/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield

[LabBuildApp] File "/[snip]/miniconda3/envs/jlab2b1pip/lib/python3.8/site-packages/jupyterlab/labapp.py", line 97, in start
build(name=self.name, version=self.version,

[LabBuildApp] File "/[snip]/miniconda3/envs/jlab2b1pip/lib/python3.8/site-packages/jupyterlab/commands.py", line 475, in build
return handler.build(name=name, version=version, static_url=static_url,

[LabBuildApp] File "/[snip]/miniconda3/envs/jlab2b1pip/lib/python3.8/site-packages/jupyterlab/commands.py", line 686, in build
raise RuntimeError(msg)

[LabBuildApp] RuntimeError: JupyterLab failed to build

[LabBuildApp] Exiting application: JupyterLab

@jasongrout
Copy link
Contributor Author

@jasongrout jasongrout commented Dec 24, 2019

@blink1073 - I don't see the release commits or tags for 2.0.0b1 in master. Did you push those to master?

@telamonian
Copy link
Member

@telamonian telamonian commented Dec 26, 2019

I was able to repro this as well. I think the problem is that the vega deps in vega5-extension/package.json are listed under "devDependencies" instead of just plain "dependencies":

"dependencies": {
"@jupyterlab/rendermime-interfaces": "^2.0.0-alpha.4",
"@lumino/coreutils": "^1.4.0",
"@lumino/widgets": "^1.9.4"
},
"devDependencies": {
"@types/webpack-env": "^1.14.1",
"rimraf": "~3.0.0",
"typedoc": "^0.15.4",
"typescript": "~3.7.3",
"vega": "^5.9.0",
"vega-embed": "^6.2.1",
"vega-lite": "^4.0.2"
},

I assume this is a holdover from how the vega build worked before #7650. cc @saulshanabrook

I have a fix up over at #7699. I'm unable to fully test the fix without it being pulled in and released, but I was able to get jupyter lab build to work by putting the vega deps into my distribution's staging/package.json file.

@lock lock bot added the status:resolved-locked label Jan 29, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants