[solved] Running into build error with import even when it works locally.
Have a file
Layout.tsx
importing Header.tsx
both in same directory, but still runs into build error.37 Replies
do you have a default export in
Header.tsx
?yep
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
im a bit new to Ts not sure what that is
did you create this app with
create-t3-app
?unfortunately the time i created this was using create-next-app (also new to t3)
Running into build error with import even when it works locally.is this a build error when deploying ?
have this:
in tsconfig
thats what your question implies
yep
do you have a github repo for this?
yep but it's private atm not sure if i have the rights to show
on vercel or something else?
yep vercel
could the error be because of filenames starting with a capital letter?
make sure that
Header.tsx
is tracked by git
shouldnt beexactly
aha!
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i guess when i changed the name it didn't track it
that's the issue
Stack Overflow
Changing capitalization of filenames in Git
I am trying to rename a file to have different capitalization from what it had before:
git mv src/collision/b2AABB.js src/collision/B2AABB.js
fatal: destination exists, source=src/collision/b2AABB...
follow the instructions here
thanks a lot!
how do i mark the question solved?
¯\_(ツ)_/¯
is there an "archive" in the options?
the 3 dots menu
i only see that because i'm not admin/OP
there's a close post
does the deployment work tho
fixing the casing now and redeploying
but i think it will
@Samathingamajig it worked! other errors happening gonna fix that, thanks!
What approach did you follow from the stackover flow? In cases like this I usually delete the file and create it again so git can start tracking
used
git mv myFile MyFile
and it worked, even without the --force
flagbtw you should use
git mv oldname newname
whenever renaming/moving a file, because otherwise git will be dumb and think you deleted a file and added a file and the history of the file will be "lost" (though you can go back in commits and view the history of the old file name)ah right , I usually renamed images so far, good info, I dint think about that.
yep, learned a completely new thing today haha thanks.