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
@"use php"
@"use php"
Answered by "use php"
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
@"use php"
sharing files would be a hard thing
Alright
yup
@"use php" 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 @"use php" 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
@"use php" 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
@"use php"
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)
@"use php" 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 @"use php" how did you learn next js , what path did you follow and what tutorials etc
@"use php" <@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
@"use php" I'm currently making 2
which one
@rkstlohchab what approach do you take
@"use php" 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
@"use php" 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