build error but no compile error
Answered
rkstlohchab posted this in #help-forum
it is saying import errors but as i can see there is no import error how to fix it
@Anay-208
@Anay-208
Answered by Anay-208
Summary of the issue:
- The file error was caused due to case sensitivity
- It was caused because you didn't lint your code.
- It was fixed by using prettier tailwind
- the attribute error was there because the function didn't accept that attribute
- The file error was caused due to case sensitivity
- It was caused because you didn't lint your code.
- It was fixed by using prettier tailwind
- the attribute error was there because the function didn't accept that attribute
149 Replies
let me see
Can you share your files in
@/componentsyou can access my session for ease
@Anay-208
sharing files would be a hard thing
Alright
yup
@Anay-208 Alright
the link worked or not?
yes
can you share your terminal
i did
check again
I just need read accesss
clicked on read access
Can you try running again once?
npm run buildI'm trying some stuff for the sake of testing
ohkiyy
Can you try running now, The page won't work as expected, but I want to test
Can you run now, I might have not saved the file
the files are autosaved every second but still lemme try
same
Wait, can you run now?
I think I fixed it
ohky lemme see i
umm
@rkstlohchab it is saying import errors but as i can see there is no import error how to fix it
<@755810867878297610>
This bug is due to casing. More info here https://nextjs-faq.com/module-not-found-due-to-case-sensitivity. Just avoid PascalCase and camelCase when naming your files.
lemme try that @joulev
I changed case sensitivity of the imported filename, but it still didn't work. So, according to joulev, use lowercase
yep @Anay-208 lemme try wait a sec
rename the file to lowercase
So @rkstlohchab, the recommend solution is to use
kebab-case instead of camelCaseYa, just run the command
the install one
damn bro more errors
😂
You can use prettier plugin for it
to fix classNames
now i have to disable eslint
@rkstlohchab now i have to disable eslint
If you want to urgently push it to production, then it can be used, otherwise don't
its not a good practice
@rkstlohchab i am using it
prettier tailwindcss plugin
@Anay-208 its not a good practice
so i should not use eslint right?
Wait, I think there should be a plugin for eslint too
you can google it
Please avoid pinging moderators
ohkyy
You can surely ping those who are ok with getting pinged for help, like me
@rkstlohchab Click to see attachment
I think this should be good
@rkstlohchab Click to see attachment
this was preinstalled
even before the project
yet im getting errors
try running
npx next lintnow, let me see if I can fix it
oh ohky
btw i wanna ask i feel like i am disturbing u alot if thats the case u can tell me
Can you run
npx next lint on console, so I can fix it?or are you learning something from this ?
So I'm free
ohkyy
run
npx next lint --fixsame errors
I recommend you to install a plugin for eslint to fix the order of classes
Not vscode plugin
then?
npm
use prettier plugin only then
prettier i also installed so now i have to remove "eslint-plugin-tailwindcss": "^3.13.0",
?
?
You can clean it up once prettier is success
@Anay-208
lemme see
It takes some time for this warning to go once you update the attr/args
What exactly is not working here if i ask ?
Previously it was working
Previously it was working
And why does the build is causing problem not dev?
In build, the app is being linted, and it doesn't happen in dev
You can disable these rules(not recommend)
@Anay-208 You can disable these rules(not recommend)
Whats recommend then brother?
@rkstlohchab Click to see attachment
Try restarting vscode
to get rid of this warning, it should work
@rkstlohchab Whats recommend then brother?
I use prettier w tailwind, works fine
@rkstlohchab can you show code for
QuestionCard?btw @Anay-208 how did you learn next js , what path did you follow and what tutorials etc
@Anay-208 <@864447735814291476> can you show code for `QuestionCard`?
lemme give u access
@rkstlohchab btw <@755810867878297610> how did you learn next js , what path did you follow and what tutorials etc
from the official documentation
If you know react + express, you can easily leanr
what approach do you take
@rkstlohchab what if u have to build like a bigger
I'm currently making 2
@Anay-208 I'm currently making 2
which one
@rkstlohchab what approach do you take
@Anay-208 like except design and all i wanna ask code logic part mainly
@rkstlohchab which one
For clients basically, can't share confidental info
@rkstlohchab <@755810867878297610> like except design and all i wanna ask code logic part mainly
I'll let you know after resolving the issue
sure
@Anay-208 For clients basically, can't share confidental info
no worries i understand
is the build workin
@rkstlohchab now tell
And FYI, I'm just 15 yo. Let me know if I should continue telling
age doesnt decide bro
im also 19 only
Wait, We'll move this convo to #off-topic in a min
sure
Summary of the issue:
- The file error was caused due to case sensitivity
- It was caused because you didn't lint your code.
- It was fixed by using prettier tailwind
- the attribute error was there because the function didn't accept that attribute
- The file error was caused due to case sensitivity
- It was caused because you didn't lint your code.
- It was fixed by using prettier tailwind
- the attribute error was there because the function didn't accept that attribute
Answer
Mark the above message as a solution
here is the problem i dont get mark as solution option
Right Click > Apps > Mark solution
in my discord
Alright, I'll soon ask a helper