4

Astro: Rollup failed to resolve import | Steve Fenton

 1 year ago
source link: https://www.stevefenton.co.uk/2022/09/astro-rollup-failed-to-resolve-import/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Astro: Rollup failed to resolve import

This is short reminder to my future self about an error I found in Astro, which defied explanation. This ran find on a local npm run build, but inside of GitHub actions it failed.

Rollup failed to resolve import "../components/Head/Head.astro"

For better or worse, I solved this by renaming Head.astro to HtmlHead.astro.

Either the term Head conflicts with something, or it doesn’t like the folder and file having the same name, i.e. /Head/Head.astro.

Know more about this than me? Let me know!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK