Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with Run the CLI command "npx shadcn-ui@latest init" #11

Open
jaafar2000 opened this issue Apr 9, 2024 · 2 comments
Open

issue with Run the CLI command "npx shadcn-ui@latest init" #11

jaafar2000 opened this issue Apr 9, 2024 · 2 comments

Comments

@jaafar2000
Copy link

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\jaafa\AppData\Local\npm-cache_npx\125ee17d583c4e03\node_modules\diff\lib\index.mjs' imported from C:\Users\jaafa\AppData\Local\npm-cache_npx\125ee17d583c4e03\node_modules\shadcn-ui\dist\index.js
Did you mean to import "diff/lib/index.js"?
at finalizeResolution (node:internal/modules/esm/resolve:265:11)
at moduleResolve (node:internal/modules/esm/resolve:933:10)
at defaultResolve (node:internal/modules/esm/resolve:1157:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
at ModuleWrap. (node:internal/modules/esm/module_job:87:39)
at link (node:internal/modules/esm/module_job:86:36) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///C:/Users/jaafa/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/diff/lib/index.mjs'
}

@anisharya16
Copy link

try deleting node_modules and then run npm i command. Then run the shadcn command. Should fix it.

@bharatpaliwal-169
Copy link

Even better approach is to delete the entire project folder and start from scratch, make sure you update your npm, node versions and you are using latest versions of all the necessary tools. The other better way to work is to take the checkout of main branch and delete the code part and keep the config part. That would be a better starter boilerplate for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants