cboard-org / cboard-ai-builder

The Cboard AI Builder is an augmentative and alternative communication (AAC) board generator designed to streamline the creation process for speech therapists or caregivers. It aims to reduce the time required to create specific AAC boards and provide a preliminary draft quickly.
https://cboard.io
GNU General Public License v3.0
7 stars 3 forks source link

lint-staged is checking files in .next directory #44

Open maxicapodacqua opened 7 months ago

maxicapodacqua commented 7 months ago

I was able to reproduce this by deleting a file I didn't need while having yarn dev running in a different terminal.

yarn run v1.22.21
$ /home/maxicapodacqua/personal/cboard-ai-builder/node_modules/.bin/lint-staged
✔ Preparing lint-staged...
⚠ Running tasks for staged files...
  ❯ lint-staged.config.js — 2 files
    ❯ **/*.(ts|tsx) — 2 files
      ✖ yarn tsc --noEmit [FAILED]
    ✔ **/*.(ts|tsx|js) — 2 files
    ↓ **/*.(md|json) — no files
↓ Skipped because of errors from tasks.
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...

✖ yarn tsc --noEmit:
error Command failed with exit code 2.
$ /home/maxicapodacqua/personal/cboard-ai-builder/node_modules/.bin/tsc --noEmit
.next/types/app/[locale]/signin/layout.ts(2,24): error TS2307: Cannot find module '../../../../../src/app/[locale]/signin/layout.js' or its corresponding type declarations.
.next/types/app/[locale]/signin/layout.ts(5,29): error TS2307: Cannot find module '../../../../../src/app/[locale]/signin/layout.js' or its corresponding type declarations.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-commit hook exited with code 1 (error)

tsc shouldn't be checking for files in any artifact folder as those are auto-generated. My workaround for now is to delete the .next/ directory and start the dev server again.

tomivm commented 7 months ago

@sussysloth do you want to take this issue?

sussysloth commented 7 months ago

yeah! that would be good, thanks!