screenshot of VS code giving error
This is the error message that it is giving:
PS C:UsersmckenOneDriveDesktopCodedexGHW> npx shadcn-ui@latest init
node:fs:573
return binding.open(
^
Error: package.json: ENOENT: no such file or directory, open ‘C:UsersmckenOneDriveDesktopCodedexGHWpackage.json’
at Object.openSync (node:fs:573:18)
at Object.readFileSync (node:fs:452:35)
at Object.readFileSync (C:UsersmckenAppDataLocalnpm-cache_npx125ee17d583c4e03node_modulesjsonfileindex.js:50:22)
at _e (file:///C:/Users/mcken/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/shadcn-ui/dist/index.js:245:5248)
at _t (file:///C:/Users/mcken/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/shadcn-ui/dist/index.js:245:5379)
at file:///C:/Users/mcken/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/shadcn-ui/dist/index.js:245:5606
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5) {
errno: -4058,
code: ‘ENOENT’,
syscall: ‘open’,
path: ‘C:UsersmckenOneDriveDesktopCodedexGHWpackage.json’
}
Node.js v20.15.1
I have tried finding what directory I need to add a folder to because it seems that is the problem, but I’m not sure from the error where this would be or what file needs to be added.
McKenna Parker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.