Release 2.0.0 broken - can't resolve 'worker-loader' in '/opt/conda/share/jupyter/lab/staging/node_modules/pdfjs-dist'
See original GitHub issueHi there,
The package pdfjs-dist has been released two days ago to the version v2.5.207. Jupyterlab-latex accepts any patch or minor update higher than ^2.0.943.
Link to latex dependency: https://github.com/jupyterlab/jupyterlab-latex/blob/master/package.json#L63
Links to the upstream issue
https://github.com/mozilla/pdfjs-dist/releases
https://github.com/mozilla/pdf.js/issues/11925
We are using jupyter/tensorflow-notebook:latest
to install jupyterlab/latex
. Full steps to reproduce the error in our case:
➜ ~ docker run -it jupyter/tensorflow-notebook:latest bash
jovyan@5ed9b29c83c3:~$ jupyter labextension install @jupyterlab/latex
Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details: /tmp/jupyterlab-debug-s7wqd0x1.log
Debug log:
jovyan@5ed9b29c83c3:~$ cat /tmp/jupyterlab-debug-s7wqd0x1.log
Node v13.13.0
Yarn configuration loaded.
> /opt/conda/bin/npm pack @jupyterlab/latex
npm notice
npm notice 📦 @jupyterlab/latex@2.0.0
npm notice === Tarball Contents ===
npm notice 2.2kB package.json
npm notice 1.5kB LICENSE
npm notice 3.0kB README.md
npm notice 746B lib/error.d.ts
npm notice 1.2kB lib/error.js
npm notice 637B lib/index.d.ts
npm notice 18.7kB lib/index.js
npm notice 1.1kB lib/pagenumber.d.ts
npm notice 4.2kB lib/pagenumber.js
npm notice 3.8kB lib/pdf.d.ts
npm notice 17.3kB lib/pdf.js
npm notice 401B schema/plugin.json
npm notice 600B style/fit_dark.svg
npm notice 600B style/fit_light.svg
npm notice 2.6kB style/index.css
npm notice 213B style/next_dark.svg
npm notice 213B style/next_light.svg
npm notice 210B style/previous_dark.svg
npm notice 210B style/previous_light.svg
npm notice 450B style/zoom_in_dark.svg
npm notice 450B style/zoom_in_light.svg
npm notice 411B style/zoom_out_dark.svg
npm notice 411B style/zoom_out_light.svg
npm notice === Tarball Details ===
npm notice name: @jupyterlab/latex
npm notice version: 2.0.0
npm notice filename: jupyterlab-latex-2.0.0.tgz
npm notice package size: 15.4 kB
npm notice unpacked size: 61.3 kB
npm notice shasum: 28ae0f04a4d1f9da4f9a8120e0aa308ee5e29efa
npm notice integrity: sha512-uPjv+QY+TXOux[...]sGZsoPJ6aknQA==
npm notice total files: 23
npm notice
jupyterlab-latex-2.0.0.tgz
Node v13.13.0
Yarn configuration loaded.
Building jupyterlab assets (build:prod:minimize)
> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
warning @blueprintjs/core@3.28.0: Invalid bin entry for "upgrade-blueprint-2.0.0-rename" (in "@blueprintjs/core").
warning @blueprintjs/core@3.28.0: Invalid bin entry for "upgrade-blueprint-3.0.0-rename" (in "@blueprintjs/core").
warning sha.js@2.4.11: Invalid bin entry for "sha.js" (in "sha.js").
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...
[5/5] Building fresh packages...
success Saved lockfile.
Done in 62.72s.
> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer --fail
yarn run v1.21.1
$ /opt/conda/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer --fail
Done in 0.81s.
> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
yarn run v1.21.1
$ ensure-max-old-space webpack --config webpack.prod.minimize.config.js
ModuleNotFoundError: Module not found: Error: Can't resolve 'worker-loader' in '/opt/conda/share/jupyter/lab/staging/node_modules/pdfjs-dist'
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/Compilation.js:925:10
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:401:22
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:130:21
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:224:22
at /opt/conda/share/jupyter/lab/staging/node_modules/neo-async/async.js:2830:7
at /opt/conda/share/jupyter/lab/staging/node_modules/neo-async/async.js:6877:13
at /opt/conda/share/jupyter/lab/staging/node_modules/neo-async/async.js:2830:7
at done (/opt/conda/share/jupyter/lab/staging/node_modules/neo-async/async.js:2925:13)
at /opt/conda/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:449:23
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:184:12
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:23:37
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/forEachBail.js:30:14
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38
at /opt/conda/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5
at eval (eval at create (/opt/conda/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
resolve 'worker-loader' in '/opt/conda/share/jupyter/lab/staging/node_modules/pdfjs-dist'
Parsed request is a module
using description file: /opt/conda/share/jupyter/lab/staging/node_modules/pdfjs-dist/package.json (relative path: .)
resolve as module
/opt/conda/share/jupyter/lab/staging/node_modules/pdfjs-dist/node_modules doesn't exist or is not a directory
/opt/conda/share/jupyter/lab/staging/node_modules/node_modules doesn't exist or is not a directory
/opt/conda/share/jupyter/lab/node_modules doesn't exist or is not a directory
/opt/conda/share/jupyter/node_modules doesn't exist or is not a directory
/opt/conda/share/node_modules doesn't exist or is not a directory
/opt/conda/node_modules doesn't exist or is not a directory
/opt/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /opt/conda/share/jupyter/lab/staging/node_modules
using description file: /opt/conda/share/jupyter/lab/staging/package.json (relative path: ./node_modules)
using description file: /opt/conda/share/jupyter/lab/staging/package.json (relative path: ./node_modules/worker-loader)
no extension
/opt/conda/share/jupyter/lab/staging/node_modules/worker-loader doesn't exist
.js
/opt/conda/share/jupyter/lab/staging/node_modules/worker-loader.js doesn't exist
.json
/opt/conda/share/jupyter/lab/staging/node_modules/worker-loader.json doesn't exist
as directory
/opt/conda/share/jupyter/lab/staging/node_modules/worker-loader doesn't exist
child_process.js:632
throw err;
^
Error: Command failed: /opt/conda/share/jupyter/lab/staging/node_modules/.bin/webpack --config webpack.prod.minimize.config.js
at checkExecSyncError (child_process.js:611:11)
at Object.execFileSync (child_process.js:629:15)
at Object.<anonymous> (/opt/conda/share/jupyter/lab/staging/node_modules/@jupyterlab/buildutils/lib/ensure-max-old-space.js:38:17)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 215,
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 "/opt/conda/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield
File "/opt/conda/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 105, in start
command=command, app_options=app_options)
File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 460, in build
command=command, clean_staging=clean_staging)
File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 661, in build
raise RuntimeError(msg)
RuntimeError: JupyterLab failed to build
Exiting application: jupyter
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Looking for help to make npm/pdfjs-dist work with Webpack ...
This issue seems to arise due to esModule option introduced in worker-loader@3.0.0 . The fix for this was merged in (pre-release) ...
Read more >How to use the pdfjs-dist.getDocument function in pdfjs-dist
To help you get started, we've selected a few pdfjs-dist.getDocument examples, based on popular ways it is used in public projects.
Read more >Compile and set the worker source with Webpack
This post demonstrates a simple way that uses the Webpack bundler to compile and set up the worker source based on the current...
Read more >worker-loader - webpack - JS.ORG
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >worker-loader - npm
worker loader module for webpack. Latest version: 3.0.8, last published: 2 years ago. Start using worker-loader in your project by running ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’re noticing this issue as well. Wouldn´t it be the easiest for now to remove the ^ and publish a new patch release. Currently jupyterlab-latex is broken.
Here is an alternative solution,
git clone https://github.com/jupyterlab/jupyterlab-latex.git
cd jupyterlab-latex
package.json
as others have suggested, remove^
from the line 63:"pdfjs-dist": "^2.0.943"