I have time options that I export to specific files named TimeOptions where I have Intl.DateFormat
code like this
When I rename the file from TimeOptions
to timeOptions
, Vercel told that Type error: Cannot find module '../utils/timeOptions' or its corresponding type declarations.
on build.
When I built it locally with next build
, the results looks fine and no error.
Do you know what's happened? I have tried to setup tsconfig.js
as mentioned in other threads but nothing seems to work on Vercel.
Here I attach the tsconfig file.
Thank you very much for your kind help.
It's caused by git not being case sensitive on file naming and not picking up your change.
You can fix it like this:
mv timeOptions.ts temp.ts
git add -A
git commit -m "renaming..."
mv temp.ts TimeOptions.ts
git add -A
git commit --amend -m "Rename timeOptions.ts to TimeOptions.ts"