Open jaafar2000 opened 5 months ago
try deleting node_modules and then run npm i command. Then run the shadcn command. Should fix it.
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.
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'
}