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

Fail to copy static image during build #701

Closed
qrevel opened this issue May 25, 2018 · 12 comments
Closed

Fail to copy static image during build #701

qrevel opened this issue May 25, 2018 · 12 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: claimed Issue has been claimed by a contributor who plans to work on it.

Comments

@qrevel
Copy link

qrevel commented May 25, 2018

Is this a bug report?

yes

Have you read the Contributing Guidelines on issues?

yes

Environment

Docusaurus: 1.1.3
Node: 10.1

Steps to Reproduce

  1. Use the same favicon file for both headerIcon and favicon
grep favicon website/siteConfig.js
  headerIcon: 'img/favicon.png',
  favicon: 'img/favicon.png',
  1. Put the favicon file in the static directory
ls website/static/img
aws-icons   favicon     favicon.png
  1. Run the build: yarn build

  2. Check file presence in build directory

ls website/build/img
aws-icons    favicon     language.svg

Expected Behavior

The favicon.png should be there

Actual Behavior

Everything is copied except this file.

It was working on 1.0.15, the bug was introduced with 1.1 versions.

@ahmadalfy
Copy link
Contributor

It will be useful if you can share the favicon image. It might be introduced due to this PR

@JoelMarcey
Copy link
Contributor

I just ran yarn build on the Docusaurus site, and I see favicon.ico in my build. So I am curious if @ahmadalfy may be right on this.

@ahmadalfy
Copy link
Contributor

What I am thinking of is that the file is an invalid image (like an icon using the png extension) and hence optipng fails to compress it and move it.

@qrevel
Copy link
Author

qrevel commented May 28, 2018

You might be right, here is the icon:

favicon

@qrevel
Copy link
Author

qrevel commented May 28, 2018

In addition, I think it has been edited with Preview on macOS.

@ahmadalfy
Copy link
Contributor

Can you try to check the integrity of the image using this tool? I need to update the command line tools before running it (check this guide)

@qrevel
Copy link
Author

qrevel commented May 29, 2018

File: website/static/img/favicon.png (15037 bytes)
  chunk IHDR at offset 0x0000c, length 13
    174 x 202 image, 32-bit RGB+alpha, non-interlaced
  chunk gAMA at offset 0x00025, length 4: 0.45455
  chunk cHRM at offset 0x00035, length 32
    White x = 0.3127 y = 0.329,  Red x = 0.64 y = 0.33
    Green x = 0.3 y = 0.6,  Blue x = 0.15 y = 0.06
  chunk iTXt at offset 0x00061, length 523, keyword: XML:com.adobe.xmp
    uncompressed, no language tag
    no translated keyword, 502 bytes of UTF-8 text
  chunk IDAT at offset 0x00278, length 14385
    zlib: deflated, 32K window, superfast compression
  chunk IEND at offset 0x03ab5, length 0
No errors detected in website/static/img/favicon.png (6 chunks, 89.3% compression).

@endiliey endiliey added the bug An error in the Docusaurus core causing instability or issues with its execution label Jun 1, 2018
@endiliey
Copy link
Contributor

endiliey commented Jun 1, 2018

@ahmadalfy are you working on this ?

@ahmadalfy
Copy link
Contributor

@endiliey yes will check, my apologies for the delay

@endiliey endiliey added the status: claimed Issue has been claimed by a contributor who plans to work on it. label Jun 2, 2018
@SleepWalker
Copy link
Contributor

I've got the similar issue, while running build on Docker node jessie image, using yarn. There was a problem with imagemin can not build and, as a result the images won't converted (but silently. Probably in newer versions it is not silent anymore)

@endiliey
Copy link
Contributor

endiliey commented Aug 4, 2018

This has been happening on my local (although randomly) as well. I thought it was a local issue but today I confirmed that it is not. In fact, Docusaurus itself is experiencing this.

See
https://circleci.com/gh/facebook/Docusaurus/2847
https://circleci.com/gh/facebook/Docusaurus/2844
https://circleci.com/gh/facebook/Docusaurus/2846

jpegtran-promise

The build succeed but along the line there is an unhandled promise. Causing christopher-chedeau.jpg and ricky-vetter.jpg to be missing.

missing image

SSH-ing circleci build also confirmed the suspicion of missing image file

Wondering if you have an idea on this @ahmadalfy ?
Seems that imagemin/imagemin#154 is related

cc @yangshun @JoelMarcey

Edit: See #887

@huchenme
Copy link

huchenme commented Jan 4, 2019

Can we not through those errors in console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: claimed Issue has been claimed by a contributor who plans to work on it.
Projects
None yet
Development

No branches or pull requests

6 participants