I was trying to deploy my React app in Azure as a Static Web App.
I have the code hosted in GitHub, so when I created the Static Web App, Azure offered to set up GitHub Actions for me and run the pipeline to deploy the code.
Unfortunately, although the code was building fine on my machine, when it was getting build in the GitHub Action it was using a build system named Oryx that found some issues that were not flagged during local build.
The last issue that it signaled was this one:
TS2307: Cannot find module '../models/Puzzle' or its corresponding type declarations.
> 1 | import Puzzle from "../models/Puzzle";
...
---End of Oryx build logs---
Oryx has failed to build the solution.
, which was weird, as I checked locally and I had the Puzzle.ts
file where it was importing it from.
I spent a couple of hours debugging this.