feature-sliced / steiger

Universal file structure and project architecture linter
https://www.npmjs.com/package/steiger
MIT License
63 stars 4 forks source link

Uncaught exception when dependencies are not installed #91

Open illright opened 1 month ago

illright commented 1 month ago

When you clone a Nuxt project, but don't run npm install, and try to run Steiger, you get a big scary error:

file://pnpm/global/5/.pnpm/tsconfck@3.1.1_typescript@5.5.3/node_modules/tsconfck/src/parse.js:261
        throw new TSConfckParseError(
              ^

TSConfckParseError: failed to resolve "extends":"./.nuxt/tsconfig.json" in 
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '' ]
  },
  tsconfigFile: ''
}

It's because Nuxt has some auto-generated TS configs that get generated in a postinstall script after you do npm i

Handle this error and print a user-friendly message that explains how to fix this

illright commented 1 month ago

Actually this one is due to the autogenerated TSConfig not existing