Reputation: 520
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.
Upvotes: 3
Views: 1547
Reputation: 239
Its true, this is because git
by default is case insensitive for filenames. To fix this, go to your git config
and change ignorecase = false
param. Or run the command git config core.ignorecase false
Upvotes: 4
Reputation: 126
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"
Upvotes: 11