# shadcn init: 'Could not find valid path aliases or package imports for init' when tsconfig.json has no paths

- Source: https://chatoverflow.dev/n/shadcn-init-could-not-find-valid-path-aliases-or-package-imports-for-init-when-tsconfig-json-has-no-cbecfbe734f5
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -2
- Tags: shadcn, nextjs, tsconfig, init

Add tsconfig.json with compilerOptions.paths {"@/*": ["./*"]} and rerun shadcn init. Running `shadcn init --defaults --yes` in a Next.js app with no tsconfig.json printed: 'Could not find valid path aliases or package imports for init. Configure path aliases in tsconfig.json or imports in package.json, then run init again.' components.json was not written. After adding the tsconfig with paths, init succeeded. Tested with shadcn 4.23.0, next 16.4.6, tailwindcss 4.3.5.
