plotly / jupyterlab-dash

An Extension for the Interactive development of Dash apps in JupyterLab
MIT License
360 stars 56 forks source link

Can't install node dependencies on WSL #20

Open reckoner opened 5 years ago

reckoner commented 5 years ago
> /opt/conda/bin/npm pack jupyterlab-dash@0.1.0-alpha.2
npm notice
npm notice �  jupyterlab-dash@0.1.0-alpha.2
npm notice === Tarball Contents ===
npm notice 0     package
npm notice 321B  CHANGELOG.md
npm notice === Tarball Contents ===
npm notice 0     package
npm notice 321B  CHANGELOG.md
npm notice 1.1kB LICENSE.txt
npm notice 1.6kB README.md
npm notice 0     lib
npm notice 1.2kB package.json
npm notice 0     style
npm notice 230B  lib/index.d.ts
npm notice 4.9kB lib/index.js
npm notice 100B  style/index.css
npm notice === Tarball Details ===
npm notice name:          jupyterlab-dash
npm notice version:       0.1.0-alpha.2
npm notice filename:      jupyterlab-dash-0.1.0-alpha.2.tgz
npm notice package size:  3.9 kB
npm notice unpacked size: 9.5 kB
npm notice shasum:        bd7e46bd153ecfc41b6c5c43b9bb2fc0977295a6
npm notice integrity:     sha512-m48N6pJlVQmNn[...]FEKT8F7AnR67A==
npm notice total files:   10
npm notice
jupyterlab-dash-0.1.0-alpha.2.tgz
Node v10.13.0

> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install

yarn install v1.9.4
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.[3/5] Fetching packages...
[-----------------------------------------------------------------------] 0/833(node:2683) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info fsevents@1.2.7: The platform "linux" is incompatible with this module.info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1" has incorrect peer dependency "react@^15.6.1".
warning "@jupyterlab/vega4-extension > vega-embed > vega-themes@2.3.0" has unmet peer dependency "vega@*".
[5/5] Building fresh packages...success Saved lockfile.
Done in 57.77s.
> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build
yarn run v1.9.4
$ webpackHash: dc8af5a882d6a837bb7a
Version: webpack 4.12.2
Time: 28858ms
Built at: 03/26/2019 5:56:09 PM
                                   Asset       Size        Chunks             Chunk Names
    vendors~vega.2ea76bfc25e70d59a551.js   2.95 MiB  vendors~vega  [emitted]  vendors~vega
    674f50d287a8c48dc19ba404d20fe713.eot    162 KiB                [emitted]
    912ec66d7572ff821749319396470bde.svg    434 KiB                [emitted]
   fee66e712a8a08eef5805a46892932ad.woff   95.7 KiB                [emitted]
    b06871f281fee6b241d60582ae9369b9.ttf    162 KiB                [emitted]
            main.57e42f2e017516caf7d0.js   53.3 KiB          main  [emitted]  main
               0.cc98107762fcc28532b3.js    4.5 KiB             0  [emitted]
            vega.91b98e783d16fd1b9e23.js  519 bytes          vega  [emitted]  vega
    vendors~main.425d1407ebaba54b83b1.js   8.06 MiB  vendors~main  [emitted]  vendors~main
  af7ae505a9eed503f8b8e6982036873e.woff2   75.4 KiB                [emitted]
               1.055322dcf6c2bb19185f.js    888 KiB             1  [emitted]
        main.57e42f2e017516caf7d0.js.map     62 KiB          main  [emitted]  main
           0.cc98107762fcc28532b3.js.map   5.73 KiB             0  [emitted]
        vega.91b98e783d16fd1b9e23.js.map  251 bytes          vega  [emitted]  vega
vendors~main.425d1407ebaba54b83b1.js.map   9.28 MiB  vendors~main  [emitted]  vendors~main
vendors~vega.2ea76bfc25e70d59a551.js.map    2.3 MiB  vendors~vega  [emitted]  vendors~vega
           1.055322dcf6c2bb19185f.js.map   1.04 MiB             1  [emitted]
                              index.html   1.54 KiB                [emitted]
Entrypoint main = vendors~main.425d1407ebaba54b83b1.js vendors~main.425d1407ebaba54b83b1.js.map main.57e42f2e017516caf7d0.js main.57e42f2e017516caf7d0.js.map
 [0] multi whatwg-fetch ./build/index.out.js 40 bytes {main} [built]
 [1] vertx (ignored) 15 bytes {main} [optional] [built]
 [2] util (ignored) 15 bytes {main} [built]
 [4] buffer (ignored) 15 bytes {main} [optional] [built]
 [5] crypto (ignored) 15 bytes {main} [optional] [built]
 [6] readable-stream (ignored) 15 bytes {main} [built]
 [8] chalk (ignored) 15 bytes {main} [built]
 [9] fs (ignored) 15 bytes {main} [built]
[10] node-fetch (ignored) 15 bytes {vega} [built]
[11] fs (ignored) 15 bytes {vega} [built]
 [ANye] ./build/index.out.js 34.9 KiB {main} [built]
 [RnhZ] ./node_modules/moment/locale sync ^\.\/.*$ 2.88 KiB {main} [optional] [built]
 [YuTi] (webpack)/buildin/module.js 497 bytes {vendors~main} [built]
 [eTbV] ./node_modules/codemirror/mode sync ^\.\/.*\.js$ 2.78 KiB {0} [built]
 [yLpj] (webpack)/buildin/global.js 489 bytes {vendors~main} [built]
    + 2428 hidden modules

WARNING in d3-array
  Multiple versions of d3-array found:
    1.2.4 ./~/d3-scale/~/d3-array from ./~/d3-scale/~/d3-array/src/index.js
    2.0.3 ./~/d3-array from ./~/d3-array/src/index.js

WARNING in vega-lite
  Multiple versions of vega-lite found:
    2.5.1 ./~/vega-lite/build/src from ./~/vega-lite/build/src/compile/selection/selection.js
    2.6.0 ./~/vega-lite/build from ./~/vega-lite/build/src/index.js

Check how you can resolve duplicate packages: 
https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#resolving-duplicate-packages-in-your-bundle

Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [KTNU] ./node_modules/html-loader!./templates/partial.html 567 bytes {0} [built]
    [YuTi] (webpack)/buildin/module.js 497 bytes {0} [built]
    [aS2v] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/template.html 1.22 KiB {0} [built]
    [yLpj] (webpack)/buildin/global.js 489 bytes {0} [built]
        + 1 hidden module
Done in 36.50s.
jonmmease commented 5 years ago

Hi @reckoner,

Could you explain what you're trying to do and what problem you're seeing? To me it looks like the command above completed successfully. Thanks!

reckoner commented 5 years ago

The plotly figures do not render in jupyter lab. The dev console in the browser reports:

lab:1 Uncaught ReferenceError: require is not defined
at <anonymous>:1:1
at PanelLayout.push.HWBy.PanelLayout.attachWidget (vendors~main.425d1407ebaba54b83b1.js:59278)
at PanelLayout.push.HWBy.PanelLayout.insertWidget (vendors~main.425d1407ebaba54b83b1.js:59181)
at OutputArea._insertOutput (vendors~main.425d1407ebaba54b83b1.js:169890)
at OutputArea.onModelChanged (vendors~main.425d1407ebaba54b83b1.js:169772)
at invokeSlot (vendors~main.425d1407ebaba54b83b1.js:193744)
at Object.emit (vendors~main.425d1407ebaba54b83b1.js:193702)
at Signal.push.qUp9.Signal.emit (vendors~main.425d1407ebaba54b83b1.js:193375)
at OutputAreaModel._onListChanged (vendors~main.425d1407ebaba54b83b1.js:9458)
at invokeSlot (vendors~main.425d1407ebaba54b83b1.js:193744)
reckoner commented 5 years ago

For some reason doing the following:

jupyter labextension install @jupyterlab/plotly-extension

makes jupyter-dash work.