nicoalbanese / kirimase

Build full-stack Next.js apps, incredibly fast
https://kirimase.dev
MIT License
2.39k stars 107 forks source link

npx kirimase init fails for new next app using javascript "no such file or directory, open 'tsconfig.json'" #80

Closed dcourv closed 7 months ago

dcourv commented 7 months ago

After running the following: npx create-next-app@latest next-app > typescript: no > eslint: yes > tailwind: yes > src dir: yes > app router: yes > customize import alias: no

(in next-app directory) npx kirimase@latest init > src dir: yes > preferred package manager: npm

I get the following error:



node:fs:453
    return binding.readFileUtf8(path, stringToFlags(options.flag));
                   ^

Error: ENOENT: no such file or directory, open 'tsconfig.json'
    at readFileSync (node:fs:453:20)
    at Command.initProject (file:///Users/dcourv/.npm/_npx/6b95167c46caeb29/node_modules/kirimase/dist/commands/init/index.js:50:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'tsconfig.json'
}

Node.js v21.1.0```
nicoalbanese commented 7 months ago

ahh this is a good point somehow hasn't come up until now. Living in my typescript bubble I completely forgot to add a check for that and add some copy stating that Kirimase is only compatible with typescript projects. Sorry about that but thanks for flagging and I'll have a fix up shortly to avoid happening again.