nicoalbanese / kirimase

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

Init error if opt out Shadcn #182

Open ralvs opened 2 months ago

ralvs commented 2 months ago

Config File

{
  "hasSrc": false,
  "packages": [],
  "preferredPackageManager": "pnpm",
  "t3": false,
  "alias": "@",
  "analytics": true,
  "rootPath": ""
}

Describe the bug Does not matter the following combination of options, if I choose None for the component library, I get the error.

◐ Checking project for existing packages...                                                                                                                                                                                                                                                                                                                                                                                                                 2:30:14 PM
✔ Successfully searched project and found no additional packages.                                                                                                                                                                                                                                                                                                                                                                                          2:30:14 PM

? Select a component library to use: None
? Select an ORM to use: Prisma
? Please choose your DB type Postgres
? Select an authentication package to use: Clerk
? Select any miscellaneous packages to add: TRPC, Stripe, Resend
⠋ node:internal/fs/utils:921
    throw new ERR_INVALID_ARG_TYPE(
          ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Object.writeFileSync (node:fs:2360:5)
    at replaceFile (file:///Users/renan/Library/Caches/pnpm/dlx/c5dbsceytau2sqvlf5gols4oue/18ecd85c3e4-4018/node_modules/.pnpm/kirimase@0.0.57/node_modules/kirimase/dist/utils.js:29:8)
    at addPackage (file:///Users/renan/Library/Caches/pnpm/dlx/c5dbsceytau2sqvlf5gols4oue/18ecd85c3e4-4018/node_modules/.pnpm/kirimase@0.0.57/node_modules/kirimase/dist/commands/add/index.js:103:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v20.11.1

To Reproduce Steps to reproduce the behavior:

  1. pnpmx create-next-app@latest
  2. cd project
  3. pnpmx kirimase@latest init
  4. select "None" for the component library
  5. select the follow options
  6. error after select the miscellaneous packages

Desktop (please complete the following information):