Skip to content

Asset mapper warnings #6377

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

Closed
zorn-v opened this issue May 20, 2024 · 12 comments
Closed

Asset mapper warnings #6377

zorn-v opened this issue May 20, 2024 · 12 comments
Labels

Comments

@zorn-v
Copy link

zorn-v commented May 20, 2024

API Platform version(s) affected: 3.3.3

Description

00:29:59 WARNING   [asset_mapper] Unable to find asset "./path/to/domAnimations" imported from "/var/www/html/vendor/api-platform/core/src/Symfony/Bundle/Resources/public/graphiql/graphiql.min.js".
00:30:00 WARNING   [asset_mapper] Unable to find asset "./files/open-sans-hebrew-700-normal.woff2" referenced in "/var/www/html/vendor/api-platform/core/src/Symfony/Bundle/Resources/public/fonts/open-sans/700.css". The file "/var/www/html/vendor/api-platform/core/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff2" does not exist.
00:30:00 WARNING   [asset_mapper] Unable to find asset "./files/open-sans-hebrew-400-normal.woff2" referenced in "/var/www/html/vendor/api-platform/core/src/Symfony/Bundle/Resources/public/fonts/open-sans/400.css". The file "/var/www/html/vendor/api-platform/core/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff2" does not exist.

How to reproduce

With symfony/flex run

composer req api asset-mapper
./bin/console asset-map:compile

Possible Solution

Put that font files or remove its definitions.
About "./path/to/domAnimations" - it is in comment and known behavior of asset mapper
https://symfony.com/doc/current/frontend/asset_mapper.html#missing-asset-warnings-on-commented-out-code
BUT, graphiql.min.js is not looks like "min" version but "debug" version with 3,0M (!!!) file size.

Additional Context

It does not harm anything, just annoying

@soyuka
Copy link
Member

soyuka commented May 31, 2024

https://github.com/graphql/graphiql/blob/fa0e7f7a141d10a78e8773cf723781e265fba470/packages/graphiql/resources/build.sh#L16 :/ we do copy this one I'm not a huge fan of having these files inside api platform but we don't have an alternative sadly.

@soyuka soyuka closed this as completed May 31, 2024
@zorn-v
Copy link
Author

zorn-v commented Jun 1, 2024

Yeah, seems a bug in some build pipeline for graphiql
https://www.npmjs.com/package/graphiql?activeTab=code

"min" file have same size and definitely not minimized and have debug strings in it

@zorn-v
Copy link
Author

zorn-v commented Jun 11, 2024

What about missing files ?

@latheva
Copy link

latheva commented Jun 11, 2024

I am facing same issue :) any updates?

@soyuka
Copy link
Member

soyuka commented Jun 13, 2024

I updated the assets at #6400 I had no more errors do you still see some? Maybe that I need to update the distribution to be in sync?

@soyuka soyuka reopened this Jun 13, 2024
@latheva
Copy link

latheva commented Jun 13, 2024

--no-debug option does save me temporarily

php bin/console asset-map:compile --no-debug

@zorn-v
Copy link
Author

zorn-v commented Jun 13, 2024

I updated the assets at #6400 I had no more errors do you still see some?

There are still warnings in 3.3.5

@soyuka
Copy link
Member

soyuka commented Jun 13, 2024

@zorn-v
Copy link
Author

zorn-v commented Jun 14, 2024

But not exist at https://github.com/api-platform/core/blob/v3.3.5/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff2
😉

I see update, thanks. Those warnings about missing files gone in 3.3.6

Copy link

stale bot commented Aug 14, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 14, 2024
@stale stale bot closed this as completed Aug 21, 2024
@antonio-valerio
Copy link

Hi! I'm facing with same problem. I upgraded api-platform/core to 3.4.7 but still not working when i run
php bin/console asset-map:compile

@tacman
Copy link
Contributor

tacman commented Nov 22, 2024

I added a PR in that should solve the problem, it's because of a javascript file that's actually inside a comment.

symfony/symfony#58944

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

No branches or pull requests

5 participants