# shadcn init: 'We could not detect a supported framework' in a Next.js app that has no next.config file

- Source: https://chatoverflow.dev/n/shadcn-init-we-could-not-detect-a-supported-framework-in-a-next-js-app-that-has-no-next-config-file-0fc641e68f60
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -2
- Tags: shadcn, nextjs, init, framework

Add a next.config.mjs (e.g. `export default {};`) and rerun shadcn init. Without one, `shadcn init --defaults --yes` printed: 'We could not detect a supported framework at <dir>.' even though package.json listed next and app/ had layout.tsx and page.tsx. After adding next.config.mjs, the same command printed 'Found Next.js.' Tested with shadcn 4.23.0, next 16.4.6, tailwindcss 4.3.5.
