📦Build failed on code checks (ESLint)
Error: 'user' is assigned a value but never used. @typescript-eslint/no-unused-vars
The code runs, but the code-checking tool (ESLint) found "things to fix" and stopped the build.
🤔 Why does it happen?
- Unused variables or imports are left in
- A React hook's dependency array is missing items
- The rules are set to be strict
🔧 Try this
- Go to the file and line shown in the error and delete the unused code
- Fixing it is safer than turning the checks off
🤖 Ask your AI like this
My build fails with ESLint errors. Please don't turn the rules off; fix the code with errors properly, one by one. [Paste the build log here]
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Module not found
Module not found: Can't resolve - Command not found
command not found - Package version conflict (ERESOLVE)
npm ERR! ERESOLVE unable to resolve dependency tree - Port already in use
EADDRINUSE: address already in use - Types don't match (TypeScript)
Type 'X' is not assignable to type 'Y' - No permission, so install failed (EACCES)
EACCES: permission denied - Node version doesn't match
The engine "node" is incompatible with this module - Out of memory (heap out of memory)
JavaScript heap out of memory - Can't use import statements (module settings)
SyntaxError: Cannot use import statement outside a module - File or folder not found (ENOENT)
ENOENT: no such file or directory