-
Notifications
You must be signed in to change notification settings - Fork 35
Fix buildwarnings #1200
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
base: main
Are you sure you want to change the base?
Fix buildwarnings #1200
Conversation
✅ Deploy Preview for oasisprotocol-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jaas666. I tested your PR with downgraded image-size to 1.0.2, but I'm getting a new warning when parsing the .png file now, which is not present in recent versions (>=1.1.0) of image-size:
TypeError: unsupported file type: undefined (file: /home/oa/docs/docs/build/images/opl/celer-e2e.png)
at lookup (/home/oa/docs/node_modules/image-size/dist/index.js:42:11)
at /home/oa/docs/node_modules/image-size/dist/index.js:108:64
[WARNING] The image at "/home/oa/docs/docs/build/images/opl/celer-e2e.png" can't be read correctly. Please ensure it's a valid image.
unsupported file type: undefined (file: /home/oa/docs/docs/build/images/opl/celer-e2e.png)
So pinning to an unmaintained version of image-size
just to replace .svg warnings with the .png warning is not really fixing anything.
"image-size": "~1.0.2" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"image-size": "~1.0.2" | |
} | |
"image-size": "~1.0.2", | |
"comment": "Workaround for https://github.com/facebook/docusaurus/issues/9715" | |
} |
I'm closing this PR for now. Feel free to reopen it, if you manage to find a better workaround. |
Doing further investigation https://github.com/oasisprotocol/docs/blob/41194582fd4d1a38f50982565d06d5672d41e491/docs/build/images/opl/celer-e2e.png is actually not a PNG-formatted image, so the warning was in fact legit. I prepared a fix in #1205. Can you rebase the PR and incorporate the suggestion #1200 (comment). Then I'll merge your PR. |
This takes care of some of the warning saying svg files are unsupported during the build
Reference for solution: facebook/docusaurus#9715