media files do not show on my netlify site when I deploy my astro project.

I have this astro project working just fine on my local machine. when I do build and preview everything works as expected. but when I deployed it on netlify all media files and favicon stopped working. I have some fonts in the src directory and they work fine. but the media files in public directory do not show up. Is there a way to browse the file system on netlify or something similar?
5 Replies
Ambushfall
Ambushfall2y ago
LetMeGoogleThat.com
Let Me Google That
For all those people that find it more convenient to bother you with their question than to google it for themselves.
venego
venego2y ago
fonts, styles and images are being modified then copied (by astrojs) to the same directory called assets. the preview work. but netlify is not compatible with how astro builds the project for some reason. I even removed @astro/image but still the same thing. even the favicon.svg that supposed to be in the root path. does not exist on netlify. I though maybe it's pnpm and I added the support using netlify.toml but still no result:
[build.environment]
NPM_FLAGS = "--version" # prevent Netlify npm install
[build]
command = 'npx pnpm install --store=node_modules/.pnpm-store && npm run build'
publish = 'dist'
[build.environment]
NPM_FLAGS = "--version" # prevent Netlify npm install
[build]
command = 'npx pnpm install --store=node_modules/.pnpm-store && npm run build'
publish = 'dist'
WTF why does astro put the pbulic directory which suppose to my media files in the .gitignore?? so stupid I spent hours missing with the configuration and googling how to deploy astro to netlify "properly"
venego
venego2y ago
basic logic tho
Ambushfall
Ambushfall2y ago
Sorry Venego, did you manage to work around it?
venego
venego2y ago
yh thanks. the whole directory which contains the media files is listed in the .gitignore file. that was the problem.
Want results from more Discord servers?
Add your server