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

Resolve "can't resolve 'worker-loader'" error related to pdfjs-dist #137

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

scottweitzner
Copy link
Collaborator

Hi All,

I created this PR based on a comment here by @ian-r-rose

This PR consists of a single change to package.json:

  • pin v2.0.943 of pdfjs-dist

Originally I made this change locally so my team could install jupyterlab-latex as a custom extension, but I figured the community would appreciate this in the official extension even if it's a temporary fix.

If there is any protocol/standard I didn't adhere to in this PR please let me know.

Cheers,
Scott

Install output:

jupyter labextension install . --log-leve=DEBUG
Searching ['/Users/ScottWeitzner/dev/jupyterlab-latex', '/Users/ScottWeitzner/.jupyter', '/Users/ScottWeitzner/anaconda3/envs/notebook-env/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
Looking for jupyter_config in /etc/jupyter
Looking for jupyter_config in /usr/local/etc/jupyter
Looking for jupyter_config in /Users/ScottWeitzner/anaconda3/envs/notebook-env/etc/jupyter
Looking for jupyter_config in /Users/ScottWeitzner/.jupyter
Looking for jupyter_config in /Users/ScottWeitzner/dev/jupyterlab-latex
Node v12.16.3

> node /Users/ScottWeitzner/anaconda3/envs/notebook-env/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install
\yarn install v1.15.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@jupyterlab/application > @jupyterlab/ui-components@2.0.0" has incorrect peer dependency "react@~16.9.0".
warning " > pdfjs-dist@2.0.943" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0-alpha.0 || ^4.0.0".
warning "pdfjs-dist > worker-loader@2.0.0" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0-alpha.0 || ^4.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 11.42s.

> /usr/local/bin/npm pack /Users/ScottWeitzner/dev/jupyterlab-latex
|npm notice 
npm notice 📦  @jupyterlab/latex@2.0.0
npm notice === Tarball Contents === 
npm notice 1.5kB LICENSE                 
npm notice 2.6kB style/index.css         
npm notice 2.2kB package.json            
npm notice 401B  schema/plugin.json      
npm notice 3.0kB README.md               
npm notice 600B  style/fit_dark.svg      
npm notice 600B  style/fit_light.svg     
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  

Testing Evidence:
latex_screenshot

@madsi1m
Copy link

madsi1m commented Jul 14, 2020

merge please

@ian-r-rose
Copy link
Member

Thanks for the fix @scottweitzner, and sorry for the extremely slow turnaround!

@ian-r-rose ian-r-rose merged commit 851d0e7 into jupyterlab:master Aug 11, 2020
@ian-r-rose
Copy link
Member

Published as v2.0.1

@scottweitzner
Copy link
Collaborator Author

@ian-r-rose no worries at all. Really appreciate this. Will delete branch once my build pipeline with the new version succeeds (just to triple check)

@scottweitzner
Copy link
Collaborator Author

This is looking good. Thanks all. Deleting branch

@bioinfornatics
Copy link

bioinfornatics commented Sep 17, 2020

Thanks for the fix.
Can you push a new release on pypi in order to help everyone?

Thanks

@jamesdbrock
Copy link

It would be nice if v2.0.1 were on https://pypi.org/project/jupyterlab-latex/

@scottweitzner
Copy link
Collaborator Author

v2.0.0 of the serverextension on pypi is compatible with v2.0.1 of the labextension on npm. Nothing had changed on the server-side which is why the version wasn't bumped. You should be able to use this tool without problems as the research teams I work closely with are currently doing so.

That being said I do see the value in having the serverextension versions and the labextension versions map 1:1. @ian-r-rose is that generally the standard you follow for producing tools that have both lab and server extensions?

Sorry for any confusion all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants