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 labextension install does not work on master #1330

Closed
sc1f opened this issue Feb 19, 2021 · 4 comments · Fixed by #1377
Closed

Jupyter labextension install does not work on master #1330

sc1f opened this issue Feb 19, 2021 · 4 comments · Fixed by #1377
Labels
Milestone

Comments

@sc1f
Copy link
Contributor

sc1f commented Feb 19, 2021

When running jupyter labextension install ./packages/perspective-jupyterlab from the master branch, the labextension build fails due to the perspective-vieux WASM module not being recognized by Webpack:

ERROR in ../../../../../../../../../Users/USERNAME/perspective/packages/perspective-viewer/dist/esm/@finos/perspective-vieux/pkg/perspective_vieux_bg.wasm 1:0
Module parse failed: Unexpected character '^@' (1:0)
The module seem to be a WebAssembly module, but module is not flagged as WebAssembly module for webpack.
BREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature.
You need to enable one of the WebAssembly experiments via 'experiments.asyncWebAssembly: true' (based on async modules) or 'experiments.syncWebAssembly: true' (like webpack 4, deprecat
ed).
For files that transpile to WebAssembly, make sure to set the module type in the 'module.rules' section of the config (e. g. 'type: "webassembly/async"').
(Source code omitted for this binary file)
 @ ../../../../../../../../../Users/USERNAME/work/perspective/packages/perspective-viewer/dist/esm/@finos/perspective-vieux/pkg/perspective_vieux_bg.js 1:0-52 40:73-91 41:46-64 56:77-95
 57:50-68 64:73-91 65:46-64 203:16-44 214:4-130 218:14-138 235:16-44 247:4-131 251:4-133 260:12-37 279:18-32 293:18-27 307:18-36 321:18-31 331:4-23 335:4-72 353:8-40 359:18-43 370:18-4
8 381:18-49 388:8-55 466:38-60 466:62-85 476:8-28 526:38-60 526:62-85 548:60-82 548:84-107 752:60-82 752:84-107 760:38-60 760:62-85 775:14-25
 @ ../../../../../../../../../Users/USERNAME/work/perspective/packages/perspective-viewer/dist/esm/index-222e5e11-938bfb3c.js 1:0-101 2:0-161 2:0-161 2:0-161 2:0-161 2:0-161 2:0-161 2:0
-161 14:0-14
 @ ../../../../../../../../../Users/USERNAME/work/perspective/packages/perspective-viewer/dist/esm/viewer.js 61:13-51
 @ consume shared module (default) @finos/perspective-viewer@~0.6.2 (strict) (fallback: ../../../../../../../../../Users/USERNAME/work/perspective/packages/perspective-viewer/dist/esm/v
iewer.js)
 @ ./node_modules/@finos/perspective-jupyterlab/dist/index.js 1:115-151
 @ ./build/index.out.js 575:16-70
 @ ./build/bootstrap.js 114:20-44

webpack 5.19.0 compiled with 1 error and 19 warnings in 20356 ms

I have tried creating a custom webpack.config.js and adding it to package.json inside perspective-jupyterlab as specified here, but reading the build_log.json (/Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab/staging/build/build_log.json
and /Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab/static/build_log.json), the custom config is not appended to the main config.

This is solely a development issue, and does not affect released versions of Perspective or its users.

@sc1f
Copy link
Contributor Author

sc1f commented Mar 2, 2021

@timkpaine do we build a source extension or prebuilt extension for @finos/perspective-jupyterlab-plugin?

@texodus - the custom webpack config is probably failing because this is a source extension and not a prebuilt one.

sc1f added a commit that referenced this issue Mar 2, 2021
@timkpaine
Copy link
Member

No since we didn't have access to emdsk from the python build until it was added to the build recently here

"emsdk-npm": "https://github.com/texodus/emsdk-npm.git#bash-sub-fix",

Now we can, it's on my backlog (we do it for all of the other JPMC jupyterlab extensions).

@sc1f
Copy link
Contributor Author

sc1f commented Mar 2, 2021

@timkpaine sweet - then this issue should be easy to fix. Anything I can help out w/ on that front?

@sc1f sc1f added 0.7.0 bug Concrete, reproducible bugs labels Mar 22, 2021
@sc1f sc1f added this to the 0.7.0 milestone Mar 22, 2021
timkpaine added a commit that referenced this issue Mar 24, 2021
@timkpaine
Copy link
Member

A big chunk is in #1355, but still issues with loading perspective-vieux.

texodus pushed a commit that referenced this issue Apr 2, 2021
@texodus texodus closed this as completed Apr 23, 2021
@texodus texodus removed the bug Concrete, reproducible bugs label Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants