Help: Amplify build phase giving errors that do not happen locally
I am building a vite application with typescript and when I build the app locally, the compilation returns no errors. However, the building phase in Amplify fails because of some errors that make no sense.
Here's the output from amplify:
```
2024-03-10T23:08:59.118Z [INFO]: src/components/dialogs/reject_request.tsx(4,21): error TS2307: Cannot find module 'src/models/Message' or its corresponding type declarations.
2024-03-10T23:08:59.126Z [INFO]: src/components/tables/requests-table/index.tsx(6,23): error TS2307: Cannot find module 'src/models/Message' or its corresponding type declarations.
```
Here's the code that supposedly causes the errors:
```
typescript
// reject-request.tsx
import { db } from "src/firebaseConfig";
import useGuestRequests from "src/hooks/useGuestRequests";
import useSendErrorMutation from "src/hooks/mutations/useSendErrorMutation";
import Message from "src/models/Message";
...
```
A few things to make a note of:
- This code builds perfectly fine locally
- The exports in question do exist
- I believe I properly configre the alias for src imports
If you could help me with this I would greatly appreciate it!
Posted Mar 10, 2024, 11:18 PM UTC