apptension / saas-boilerplate

SaaS Boilerplate - Open Source and free SaaS stack that lets you build SaaS products faster in React, Django and AWS. Focus on essential business logic instead of coding repeatable features!

Home Page:https://apptension.com/saas-boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fresh project pre-commit issue

matiasanaya opened this issue Β· comments

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in detail

I ran pnpm create saas-boilerplate . and the immediately tried to run git commit -m "boilerplate: init saas-boilerplate" which failed with:

 Running pre-commit tasks πŸš€
βœ” Preparing lint-staged...
⚠ Running tasks for staged files...
  ❯ .lintstagedrc β€” 932 files (chunk 1/2)...
    ❯ *.{ts,tsx} β€” 343 files
      βœ– eslint --fix [FAILED]
    ❯ *.{json,md,html} β€” 95 files
      βœ– prettier --write [KILLED]
  ❯ .lintstagedrc β€” 931 files (chunk 2/2)...
    ❯ *.{ts,tsx} β€” 680 files
      βœ– eslint --fix [KILLED]
    ❯ *.{json,md,html} β€” 58 files
      βœ– prettier --write [KILLED]
↓ Skipped because of errors from tasks.
βœ” Reverting to original state because of errors...
βœ” Cleaning up temporary files...

βœ– eslint --fix:

Oops! Something went wrong! :(

...

husky - pre-commit hook exited with code 1 (error)

This can be fixed by running pnpm nx start webapp, maybe running pnpm install?

Your Suggestion for Changes

I'd suggest documenting this. At least for me is natural to commit the boilerplate starting state before running anything else.

The issue is caused by: nrwl/nx#20752
Basically @nx/enforce-module-boundaries eslint plugin throws an error when there is no NX graph generated. Starting webapp before first commit will call under the hood NX and generate the graph, this is why it's working after.
It can be fixed also by calling other NX command, like: pnpm nx show projects.