I started a next.js full stack project and I was installing shadcn-ui than while doing it I faced the error
when I tried to install shadcn-ui by typing
npx shadcn-ui@latest init
I got the error message
node:fs:601
handleErrorFromBinding(ctx);
^
Error: package.json: ENOENT: no such file or directory, open 'package.json'
at Object.openSync (node:fs:601:3)
at Object.readFileSync (node:fs:469:35)
at Object.readFileSync (C:UserssmaraAppDataLocalnpm-cache_npx125ee17d583c4e03node_modulesjsonfileindex.js:50:22)
at _e (file:///C:/Users/smara/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/shadcn-ui/dist/index.js:245:5248)
at _t (file:///C:/Users/smara/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/shadcn-ui/dist/index.js:245:5379)
at file:///C:/Users/smara/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/shadcn-ui/dist/index.js:245:5606
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'package.json'
}
please help me with this
New contributor
Smarak Patra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.