voila-dashboards / voila

Voilà turns Jupyter notebooks into standalone web applications
https://voila.readthedocs.io
Other
5.4k stars 501 forks source link

install @voila-dashboards/jupyterlab-preview is error #1312

Closed hktalent closed 1 year ago

hktalent commented 1 year ago

Mac os

is ok

conda deactivate
conda info --envs
conda create -n jupyterlab -y python=3.8
conda activate jupyterlab -y
conda init zsh
export PATH="$HOME/anaconda3/envs/jupyterlab/bin:$PATH"
which pip python
conda install -y -n jupyterlab -c conda-forge jupyterlab
conda install -y -n jupyterlab -c conda-forge voila
git clone git@github.com:hktalent/voila.git
cd voila

yarn install

conda install  -y -n jupyterlab  -c conda-forge jupyterlab=3 ipywidgets=8 ipyvolume bqplot scipy ipympl xleaflet=0.16.0 xeus-cling=0.13.0

is error:

jupyter labextension install @voila-dashboards/jupyterlab-preview
 $ cat /var/folders/_l/pnb2t_9s0f192bqlz1348vpr0000gn/T/jupyterlab-debug-ssmn8rns.log
Node v16.14.2

Yarn configuration loaded.
> /usr/local/bin/npm pack @voila-dashboards/jupyterlab-preview
npm notice 
npm notice 📦  @voila-dashboards/jupyterlab-preview@2.3.0-alpha.3
npm notice === Tarball Contents === 
npm notice 120B  README.md         
npm notice 94B   lib/icons.d.ts    
npm notice 222B  lib/icons.js      
npm notice 471B  lib/index.d.ts    
npm notice 6.5kB lib/index.js      
npm notice 2.1kB lib/preview.d.ts  
npm notice 4.8kB lib/preview.js    
npm notice 2.7kB package.json      
npm notice 466B  schema/plugin.json
npm notice 135B  style/base.css    
npm notice 25B   style/index.css   
npm notice 1.2kB style/voila.svg   
npm notice === Tarball Details === 
npm notice name:          @voila-dashboards/jupyterlab-preview                 
npm notice version:       2.3.0-alpha.3                                        
npm notice filename:      voila-dashboards-jupyterlab-preview-2.3.0-alpha.3.tgz
npm notice package size:  5.4 kB                                               
npm notice unpacked size: 18.8 kB                                              
npm notice shasum:        bcf9d41a5c536113dcf93b5877c36fe39784caac             
npm notice integrity:     sha512-O27in1hxt2TOh[...]mxf+Bz6gaeOGA==             
npm notice total files:   12                                                   
npm notice 
voila-dashboards-jupyterlab-preview-2.3.0-alpha.3.tgz

Node v16.14.2

Yarn configuration loaded.
Building jupyterlab assets (production, minimized)
> node /Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
warning jupyter-vue > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[3/5] Fetching packages...
warning Pattern ["node-fetch@cjs"] is trying to unpack in the same destination "/Users/51pwn/Library/Caches/Yarn/v6/npm-node-fetch-2.6.7-24de9fba827e3b4ae44dc8b20256a379160052ad-integrity/node_modules/node-fetch" as pattern ["node-fetch@^2.6.0","node-fetch@^2.6.1"]. This could result in non-deterministic behavior, skipping.
[4/5] Linking dependencies...
warning "@jupyterlab/extensionmanager > react-paginate@6.5.0" has incorrect peer dependency "react@^16.0.0".
warning "@jupyterlab/json-extension > react-highlighter@0.4.3" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.15.0" has unmet peer dependency "@types/react@^16.3.0 || ^17.0.0".
warning "@jupyterlab/vdom > @nteract/transform-vdom@4.0.16-alpha.0" has incorrect peer dependency "react@^16.3.2".
warning " > @lumino/coreutils@1.12.1" has unmet peer dependency "crypto@1.0.1".
warning "@jupyterlab/buildutils > verdaccio > clipanion@3.2.0-rc.14" has unmet peer dependency "typanion@*".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
success Saved lockfile.
Done in 56.80s.

> node /Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer --fail
yarn run v1.21.1
$ /Users/51pwn/anaconda3/envs/jupyterlab/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 /Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyterlab/staging/yarn.js
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
warning Pattern ["node-fetch@cjs"] is trying to unpack in the same destination "/Users/51pwn/Library/Caches/Yarn/v6/npm-node-fetch-2.6.7-24de9fba827e3b4ae44dc8b20256a379160052ad-integrity/node_modules/node-fetch" as pattern ["node-fetch@^2.6.0","node-fetch@^2.6.1"]. This could result in non-deterministic behavior, skipping.
[4/5] Linking dependencies...
warning "@jupyterlab/extensionmanager > react-paginate@6.5.0" has incorrect peer dependency "react@^16.0.0".
warning "@jupyterlab/json-extension > react-highlighter@0.4.3" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.15.0" has unmet peer dependency "@types/react@^16.3.0 || ^17.0.0".
warning "@jupyterlab/vdom > @nteract/transform-vdom@4.0.16-alpha.0" has incorrect peer dependency "react@^16.3.2".
warning " > @lumino/coreutils@1.12.1" has unmet peer dependency "crypto@1.0.1".
warning "@jupyterlab/buildutils > verdaccio > clipanion@3.2.0-rc.14" has unmet peer dependency "typanion@*".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
success Saved lockfile.
Done in 3.92s.

> node /Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
yarn run v1.21.1
$ webpack --config webpack.prod.minimize.config.js
[webpack-cli] ModuleNotFoundError: Module not found: Error: Can't resolve '@voila-dashboards/jupyterlab-preview/style/index.js' in '/Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/build'
    at /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/webpack/lib/Compilation.js:1768:28
    at /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:742:13
    at eval (eval at create (/Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:276:22
    at eval (eval at create (/Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:405:22
    at /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:119:11
    at /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:650:24
    at /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:813:8
    at /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:933:5
resolve '@voila-dashboards/jupyterlab-preview/style/index.js' in '/Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/build'
  Parsed request is a module
  using description file: /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/build/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/build/node_modules doesn't exist or is not a directory
      looking for modules in /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules
        existing directory /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/@voila-dashboards/jupyterlab-preview
          using description file: /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/@voila-dashboards/jupyterlab-preview/package.json (relative path: .)
            using description file: /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/@voila-dashboards/jupyterlab-preview/package.json (relative path: ./style/index.js)
              no extension
                Field 'browser' doesn't contain a valid alias configuration
                /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/@voila-dashboards/jupyterlab-preview/style/index.js doesn't exist
              .js
                Field 'browser' doesn't contain a valid alias configuration
                /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/@voila-dashboards/jupyterlab-preview/style/index.js.js doesn't exist
              .json
                Field 'browser' doesn't contain a valid alias configuration
                /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/@voila-dashboards/jupyterlab-preview/style/index.js.json doesn't exist
              .wasm
                Field 'browser' doesn't contain a valid alias configuration
                /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/@voila-dashboards/jupyterlab-preview/style/index.js.wasm doesn't exist
              as directory
                /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/@voila-dashboards/jupyterlab-preview/style/index.js doesn't exist
      /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/lab/node_modules doesn't exist or is not a directory
      /Users/51pwn/anaconda3/envs/jupyterlab/share/jupyter/node_modules doesn't exist or is not a directory
      /Users/51pwn/anaconda3/envs/jupyterlab/share/node_modules doesn't exist or is not a directory
      /Users/51pwn/anaconda3/envs/jupyterlab/node_modules doesn't exist or is not a directory
      /Users/51pwn/anaconda3/envs/node_modules doesn't exist or is not a directory
      /Users/51pwn/anaconda3/node_modules doesn't exist or is not a directory
      /Users/51pwn/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
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

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

  File "/Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyterlab/labextensions.py", line 170, in start
    build(

  File "/Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyterlab/commands.py", line 506, in build
    return handler.build(

  File "/Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyterlab/commands.py", line 722, in build
    raise RuntimeError(msg)

RuntimeError: JupyterLab failed to build

Exiting application: lab
hktalent commented 1 year ago
$ voila bqplot.ipynb
[Voila] Using /var/folders/_l/pnb2t_9s0f192bqlz1348vpr0000gn/T to store connection files
[Voila] Storing connection files in /var/folders/_l/pnb2t_9s0f192bqlz1348vpr0000gn/T/voila_t31a9rzt.
[Voila] Serving static files from /Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/voila/static.
[Voila] Voilà is running at:
http://localhost:8866/
[Voila] Writing notebook-signing key to /Users/51pwn/Library/Jupyter/notebook_secret
[Voila] WARNING | Notebook bqplot.ipynb is not trusted
[Voila] Kernel started: 6e6aef8d-1488-4ab1-aadd-09f9383285ff
/Users/51pwn/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyter_server/base/handlers.py:197: UserWarning: The Tornado web application does not have an 'authorizer' defined in its settings. In future releases of jupyter_server, this will be a required key for all subclasses of `JupyterHandler`. For an example, see the jupyter_server source code for how to add an authorizer to the tornado settings: https://github.com/jupyter-server/jupyter_server/blob/653740cbad7ce0c8a8752ce83e4d3c2c754b13cb/jupyter_server/serverapp.py#L234-L256
  warnings.warn(
404 GET /voila/files/apple-touch-icon-precomposed.png (::1) 1.16ms
404 GET /voila/files/apple-touch-icon.png (::1) 1.84ms
403 GET /voila/files/favicon.ico (::1): File not whitelisted
403 GET /voila/files/favicon.ico (::1) 2.63ms
403 GET /voila/files/voila/bqplot.js (::1): File not whitelisted
403 GET /voila/files/voila/bqplot.js (::1) 0.66ms
martinRenou commented 1 year ago

Is there a reason for installing the jupyterlab preview with jupyter labextension install @voila-dashboards/jupyterlab-preview?

It should not be needed. This extension should be installed automatically with the conda command conda install voila -c conda-forge.