3

Mysterious GitHub Actions resolution failure | Steve Fenton

 1 year ago
source link: https://www.stevefenton.co.uk/2022/09/mysterious-github-actions-resolution-failure/
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.

Mysterious GitHub Actions resolution failure

This error came from resolving an import through VITE, but it could happen just as easily for any file reference / import when you have working imports locally that fail when you run GitHub Actions. It’s worth keeping this information somewhere in your brain for later as I had to guess my way to the answer.

[vite]: Rollup failed to resolve import ...

The answer was really simple. I found a file named language.astro where all my other files were capitalised. This irritated me, to I changed it to Language.astro. I also updated all the imports to refer to the correct casing.

Locally, everything was named Language.astro and it all built fine. However, on committing the code, GitHub still listed the file as language.astro as renaming it from language->Language doesn’t update the casing.

Suspect File

Hey, why is this still lower-case?!!

To make it rename, you have to significantly change the file name, for example language->Languages (and update all the references again). When you do this, it updates in GitHub and everything works.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK