adrianhajdin / zoom-clone

Learn to develop a professional enterprise-ready video conferencing app in hours using Next.js 14, Stream, and Tailwind CSS.
https://jsmastery.pro
905 stars 294 forks source link

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

Open jaafar2000 opened 5 months ago

jaafar2000 commented 5 months ago

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 commented 4 months ago

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

bharatpaliwal-169 commented 4 months ago

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.