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

Note: pdfjs@3.0.279 has issues installing on Mac M1 (fix included) #1319

Closed
lucasgadams opened this issue Nov 9, 2022 · 2 comments
Closed
Labels
documentation Improvements or additions to documentation

Comments

@lucasgadams
Copy link

Just adding this as a FYI.

pdfjs@3.0.279 adds canvas as a dependency (though it looks like it might be made optional in the next release). Canvas doesn't have a native M1 prebuilt binary and so yarn install might break looking for it and trying to built it from source. You can fix it by installing the canvas dependencies manually, read this thread.

For me I was able to fix it by:
brew install pkg-config cairo pango libpng jpeg giflib librsvg
This is a lot of dependencies.. I believe only pkg-config cairo pango are required but I just installed them all.
brew cleanup
brew doctor
rm -r node_modules/
yarn install

@meseven
Copy link

meseven commented Nov 9, 2022

Thank you @lucasgadams, it's works with pkg-config,cairo and pango packages.

@phuocng phuocng added the documentation Improvements or additions to documentation label Nov 12, 2022
@phuocng
Copy link
Member

phuocng commented Nov 12, 2022

@lucasgadams @meseven
Thanks a lot. I updated the installation guide based on your fix.

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

No branches or pull requests

3 participants