ui
ui copied to clipboard
npx shadcn-ui@latest init
Can someone help me with this error am getting when i run the command node:internal/process/esm_loader:97 internalBinding('errors').triggerUncaughtException( ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/marksikaundi/.npm/_npx/125ee17d583c4e03/node_modules/zod/lib/index.mjs' imported from /Users/marksikaundi/.npm/_npx/125ee17d583c4e03/node_modules/shadcn-ui/dist/index.js
Did you mean to import zod/lib/index.js?
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:324:11)
at moduleResolve (node:internal/modules/esm/resolve:943:10)
at defaultResolve (node:internal/modules/esm/resolve:1129:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.
Node.js v18.17.1 marksikaundi@MacBook-Air lupleg-website % npx shadcn-ui@latest init
I'm having the same issue
I am having the similar issue. The error is about using useEffect in a server component in /react/primitive/src/Primitive.tsx.
I had the same problem here, I was using Nodejs v20.10.0 and after switching to Nodejs v18.19.0 everything worked fine.
Try this command npx shadcn-ui init
It worked for me
~Can you check which zod version is being installed?~
My bad (zod is in cli). I'll check it out.
Hello, i have the same issue. Did you find any solution?
Hello, i have the same issue. Did you find any solution?
Hey, finally, my problem was that I was using node 14. I updated it to node 21 and it works
Hello, I have the same issue. Did you find any solution?
Hey, finally, my problem was that I was using node 14. I updated it to node 21 and it works
It's good you managed to solve it
Anyone reading this in 2024... check your node version. 🤙
I have the same error and I am using the latest version of nodejs "v20.11.0" please how can i do to solve that ?
I had the same problem here, I was using Nodejs v20.10.0 and after switching to Nodejs v18.19.0 everything worked fine.
how were able to switch from v20 to v18
I had the same problem here, I was using Nodejs v20.10.0 and after switching to Nodejs v18.19.0 everything worked fine.
how were able to switch from v20 to v18
You can use NVM
Try this command
npx shadcn-ui initIt worked for me
Thank bro It work's . but npx shadcn-ui@latest init not working 😂
Try this command
npx shadcn-ui initIt worked for meThank bro It work's . but npx shadcn-ui@latest init not working 😂
Also try to use NODEJS v18 LTS, works perfect.
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
I am working on a project which i using node.js 14 and i am facing this error now. I dont want to change my node.js version as we have many dependencies on it.
npx: installed 171 in 87.257s internal/process/esm_loader.js:74 internalBinding('errors').triggerUncaughtException( ^
Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:timers/promises
at Loader.builtinStrategy (internal/modules/esm/translators.js:285:11)
at new ModuleJob (internal/modules/esm/module_job.js:43:26)
at Loader.getModuleJob (internal/modules/esm/loader.js:257:11)
at async ModuleWrap.
I am working on a project which i using node.js 14 and i am facing this error now. I dont want to change my node.js version as we have many dependencies on it.
npx: installed 171 in 87.257s internal/process/esm_loader.js:74 internalBinding('errors').triggerUncaughtException( ^
Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:timers/promises at Loader.builtinStrategy (internal/modules/esm/translators.js:285:11) at new ModuleJob (internal/modules/esm/module_job.js:43:26) at Loader.getModuleJob (internal/modules/esm/loader.js:257:11) at async ModuleWrap. (internal/modules/esm/module_job.js:58:21) at async Promise.all (index 11) at async link (internal/modules/esm/module_job.js:63:9) { code: 'ERR_UNKNOWN_BUILTIN_MODULE' }
You need higher version of Nodejs like V18