[Bug][Jupyter Widget] - labextension install fails (build error), but still works after building in UI
- Dominant language
- TypeScript
- Stars
- 12k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 66
Description
**Describe the bug**
Installation of the JupyterLab kepler.gl extension fails with build errors after running
```bash
$ jupyter labextension install keplergl-jupyter
```
keplergl extension appears to be enabled and OK after installation, but jupyter prompts you to build the lab including keplergl
```bash
$ jupyter labextension list
JupyterLab v2.2.9
Known labextensions:
app dir: /home/maxim/.local/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK
dask-labextension v4.0.1 enabled OK
keplergl-jupyter v0.2.2 enabled OK
Build recommended, please run `jupyter lab build`:
keplergl-jupyter needs to be included in build
```
**To Reproduce**
Steps to reproduce the behavior:
1. pip install jupyterlab keplergl
2. jupyter labextension install @jupyter-widgets/jupyterlab-manager
3. jupyter labextension install keplergl-jupyter
**Expected behavior**
labextension install command returns without build errors. JupyterLab builds extensions successfully and able to display Kepler map like in the guide.
**Screenshots**
Below is the ```jupyter labextension install keplergl-jupyter``` error cat
```bash
Node v12.21.0
Yarn configuration loaded.
> /usr/bin/npm pack keplergl-jupyter
npm notice
npm notice 📦 keplergl-jupyter@0.2.2
npm notice === Tarball Contents ===
npm notice 8.7kB babel/keplergl/components/app.js
npm notice 5.3kB lib/keplergl/components/app.js
npm notice 6.0kB babel/keplergl/components/config-panel.js
npm notice 3.6kB lib/keplergl/components/config-panel.js
npm notice 1.6kB babel/embed.js
npm notice 1.6kB lib/embed.js
npm notice 2.0kB babel/extension.js
npm notice 2.0kB lib/extension.js
npm notice 1.3kB babel/index.js
npm notice 5.9MB dist/index.js
npm notice 1.3kB lib/index.js
npm notice 7.4kB babel/keplergl/kepler.gl.js
npm notice 6.1kB lib/keplergl/kepler.gl.js
npm notice 4.4kB babel/keplergl-plugin.js
npm notice 2.6kB lib/keplergl-plugin.js
npm notice 1.5kB babel/labplugin.js
npm notice 1.5kB lib/labplugin.js
npm notice 1.6kB babel/log.js
npm notice 1.3kB lib/log.js
npm notice 2.4kB babel/keplergl/main.js
npm notice 2.0kB lib/keplergl/main.js
npm notice 1.8kB babel/keplergl/components/panel-header.js
npm notice 2.0kB lib/keplergl/components/panel-header.js
npm notice 2.0kB babel/keplergl/components/root.js
npm notice 1.4kB lib/keplergl/components/root.js
npm notice 1.7kB babel/keplergl/components/side-bar.js
npm notice 2.0kB lib/keplergl/components/side-bar.js
npm notice 2.1kB babel/keplergl/store.js
npm notice 2.4kB lib/keplergl/store.js
npm notice 2.8kB babel/keplergl/utils.js
npm notice 3.0kB lib/keplergl/utils.js
npm notice 2.6kB package.json
npm notice 3.1kB README.md
npm notice === Tarball Details ===
npm notice name: keplergl-jupyter
npm notice version: 0.2.2
npm notice filename: keplergl-jupyter-0.2.2.tgz
npm notice package size: 1.6 MB
npm notice unpacked size: 6.0 MB
npm notice shasum: 329c1cf2822b1085a4f43692095c926a0441d304
npm notice integrity: sha512-q9wN9MCDksjA/[...]HMrADlk37x8YQ==
npm notice total files: 33
npm notice
keplergl-jupyter-0.2.2.tgz
Node v12.21.0
Yarn configuration loaded.
Building jupyterlab assets (build:prod:minimize)
> node /home/maxim/.local/lib/python3.8/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.21.1
warning ../../../../../package.json: No license field
[1/5] Validating package.json...
[2/5] Resolving packages...
warning keplergl-jupyter > react-intl > @formatjs/intl-unified-numberformat@3.3.7: We have renamed the package to @formatjs/intl-numberformat
warning keplergl-jupyter > react-intl > intl-messageformat-parser > @formatjs/intl-unified-numberformat@3.3.7: We have renamed the package to @formatjs/intl-numberformat
warning keplergl-jupyter > kepler.gl > react-vis > hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning keplergl-jupyter > kepler.gl > @loaders.gl/polyfills > get-pixels > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning keplergl-jupyter > kepler.gl > @loaders.gl/polyfills > get-pixels > request > har-validator@5.1.5: this library is no longer supported
warning keplergl-jupyter > kepler.gl > react-palm > react-reconciler > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
[3/5] Fetching packages...
info fsevents@2.1.3: The platform "linux" 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 "linux" 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.3" has unmet peer dependency "crypto@1.0.1".
warning "keplergl-jupyter > kepler.gl > @deck.gl/extensions@8.4.9" has unmet peer dependency "gl-matrix@^3.0.0".
warning "keplergl-jupyter > kepler.gl > react-markdown@5.0.3" has unmet peer dependency "@types/react@>=16".
warning "keplergl-jupyter > kepler.gl > react-palm@3.3.7" has unmet peer dependency "enzyme@^3.6.0".
warning "keplergl-jupyter > kepler.gl > react-palm@3.3.7" has unmet peer dependency "enzyme-adapter-utils@^1.13.0".
warning "keplergl-jupyter > kepler.gl > react-palm@3.3.7" has unmet peer dependency "react-test-renderer@^16.4.1".
warning "keplergl-jupyter > kepler.gl > typedoc@0.19.2" has unmet peer dependency "typescript@3.9.x || 4.0.x".
warning "keplergl-jupyter > kepler.gl > @deck.gl/mesh-layers > @luma.gl/experimental@8.4.4" has unmet peer dependency "@loaders.gl/images@^2.3.0".
warning "keplergl-jupyter > kepler.gl > @deck.gl/mesh-layers > @luma.gl/experimental@8.4.4" has unmet peer dependency "@luma.gl/engine@^8.4.0".
warning "keplergl-jupyter > kepler.gl > @deck.gl/mesh-layers > @luma.gl/experimental@8.4.4" has unmet peer dependency "@luma.gl/gltools@^8.4.0".
warning "keplergl-jupyter > kepler.gl > @deck.gl/mesh-layers > @luma.gl/experimental@8.4.4" has unmet peer dependency "@luma.gl/webgl@^8.4.0".
warning "keplergl-jupyter > kepler.gl > react-palm > react-test-renderer@16.14.0" has incorrect peer dependency "react@^16.14.0".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 20.20s.
> node /home/maxim/.local/lib/python3.8/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer --fail
yarn run v1.21.1
warning ../../../../../package.json: No license field
$ /home/maxim/.local/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer --fail
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
> node /home/maxim/.local/lib/python3.8/site-packages/jupyterlab/staging/yarn.js
yarn install v1.21.1
warning ../../../../../package.json: No license field
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.1.3: The platform "linux" 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 "linux" 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.3" has unmet peer dependency "crypto@1.0.1".
warning "keplergl-jupyter > kepler.gl > @deck.gl/extensions@8.4.9" has unmet peer dependency "gl-matrix@^3.0.0".
warning "keplergl-jupyter > kepler.gl > react-markdown@5.0.3" has unmet peer dependency "@types/react@>=16".
warning "keplergl-jupyter > kepler.gl > react-palm@3.3.7" has unmet peer dependency "enzyme@^3.6.0".
warning "keplergl-jupyter > kepler.gl > react-palm@3.3.7" has unmet peer dependency "enzyme-adapter-utils@^1.13.0".
warning "keplergl-jupyter > kepler.gl > react-palm@3.3.7" has unmet peer dependency "react-test-renderer@^16.4.1".
warning "keplergl-jupyter > kepler.gl > typedoc@0.19.2" has unmet peer dependency "typescript@3.9.x || 4.0.x".
warning "keplergl-jupyter > kepler.gl > @deck.gl/mesh-layers > @luma.gl/experimental@8.4.4" has unmet peer dependency "@loaders.gl/images@^2.3.0".
warning "keplergl-jupyter > kepler.gl > @deck.gl/mesh-layers > @luma.gl/experimental@8.4.4" has unmet peer dependency "@luma.gl/engine@^8.4.0".
warning "keplergl-jupyter > kepler.gl > @deck.gl/mesh-layers > @luma.gl/experimental@8.4.4" has unmet peer dependency "@luma.gl/gltools@^8.4.0".
warning "keplergl-jupyter > kepler.gl > @deck.gl/mesh-layers > @luma.gl/experimental@8.4.4" has unmet peer dependency "@luma.gl/webgl@^8.4.0".
warning "keplergl-jupyter > kepler.gl > react-palm > react-test-renderer@16.14.0" has incorrect peer dependency "react@^16.14.0".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 8.11s.
> node /home/maxim/.local/lib/python3.8/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
yarn run v1.21.1
warning ../../../../../package.json: No license field
$ ensure-max-old-space webpack --config webpack.prod.minimize.config.js
child_process.js:656
throw err;
^
Error: Command failed: /home/maxim/.local/share/jupyter/lab/staging/node_modules/.bin/webpack --config webpack.prod.minimize.config.js
at checkExecSyncError (child_process.js:635:11)
at Object.execFileSync (child_process.js:653:15)
at Object. (/home/maxim/.local/share/jupyter/lab/staging/node_modules/@jupyterlab/buildutils/lib/ensure-max-old-space.js:38:17)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
status: null,
signal: 'SIGKILL',
output: [ null, null, null ],
pid: 6686,
stdout: null,
stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
JupyterLab failed to build
Traceback (most recent call last):
File "/home/maxim/.local/lib/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield
File "/home/maxim/.local/lib/python3.8/site-packages/jupyterlab/labextensions.py", line 104, in start
build(clean_staging=self.should_clean,
File "/home/maxim/.local/lib/python3.8/site-packages/jupyterlab/commands.py", line 459, in build
return handler.build(name=name, version=version, static_url=static_url,
File "/home/maxim/.local/lib/python3.8/site-packages/jupyterlab/commands.py", line 661, in build
raise RuntimeError(msg)
RuntimeError: JupyterLab failed to build
Exiting application: jupyter
```
After build error, keplergl-jupyter is listed as enabled and OK after ```jupyter labextension list``` as described in issue above. When starting JupyterLab, you are prompted again to build it 
Agreeing to build in the UI prompt successfully rebuilds environment (but not through terminal). After that slippy map is successfully displayed.
**Environment (please complete the following information):**
- Python version: python3
- Node.js: v12.21.0
- npm: v6.14.11
- @jupyter-widgets/jupyterlab-manager: v2.0.0
- keplergl-jupyter Widget version: 0.2.2
- keplregl: 0.2.2
**Additional context**
Lab extensions did not install properly in previous attempts, only succeeded when installing jupyterlab-manger first and then keplergl-jupyter.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.