You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered errors when trying to run the shadcn-ui commands as described in the documentation. The commands npx shadcn-ui@latest init and npx shadcn-ui@latest add button fail with a Cannot find package error.
Affected component/components
shadcn/ui initialization and component addition commands.
How to reproduce
Create a new Next.js project using the following command:
Error message encountered:
PS C:\Users\Forhad vi\Desktop\Tanzim\LWS\Test1\my-app> npx shadcn-ui@latest init
node:internal/modules/run_main:129
triggerUncaughtException(
^
Error: Cannot find package 'C:\Users\Forhad vi\AppData\Local\npm-cache\_npx\125ee17d583c4e03\node_modules\npm-run-path\node_modules\path-key\package.json' imported from C:\Users\Forhad vi\AppData\Local\npm-cache\_npx\125ee17d583c4e03\node_modules\npm-run-path\index.js
Did you mean to import "path-key/index.js"?
at legacyMainResolve (node:internal/modules/esm/resolve:215:26)
at packageResolve (node:internal/modules/esm/resolve:841:14)
at moduleResolve (node:internal/modules/esm/resolve:927:18)
at defaultResolve (node:internal/modules/esm/resolve:1157:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
at link (node:internal/modules/esm/module_job:86:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v20.13.1
Describe the bug
I encountered errors when trying to run the
shadcn-ui
commands as described in the documentation. The commandsnpx shadcn-ui@latest init
andnpx shadcn-ui@latest add button
fail with aCannot find package
error.Affected component/components
shadcn/ui
initialization and component addition commands.How to reproduce
cd my-app
shadcn-ui
init command:Codesandbox/StackBlitz link
No response
Logs
System Info
Before submitting
The text was updated successfully, but these errors were encountered: