Asset mapper warnings
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
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.
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
What about missing files ?
I am facing same issue :) any updates?
I updated the assets at https://github.com/api-platform/core/pull/6400 I had no more errors do you still see some? Maybe that I need to update the distribution to be in sync?
--no-debug option does save me temporarily
php bin/console asset-map:compile --no-debug
I updated the assets at #6400 I had no more errors do you still see some?
There are still warnings in 3.3.5
I see warnings but the file exist at https://github.com/api-platform/core/blob/3.3/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff2
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 :wink:
I see update, thanks. Those warnings about missing files gone in 3.3.6
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.
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
I added a PR in that should solve the problem, it's because of a javascript file that's actually inside a comment.
https://github.com/symfony/symfony/pull/58944