ui icon indicating copy to clipboard operation
ui copied to clipboard

npx shadcn-ui@latest init

Open marksikaundi opened this issue 1 year ago • 14 comments

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:internal/modules/esm/module_job:77:40) at link (node:internal/modules/esm/module_job:76:36) { code: 'ERR_MODULE_NOT_FOUND' }

Node.js v18.17.1 marksikaundi@MacBook-Air lupleg-website % npx shadcn-ui@latest init

marksikaundi avatar Dec 16 '23 20:12 marksikaundi

I'm having the same issue

Aladdin4u avatar Dec 18 '23 17:12 Aladdin4u

I am having the similar issue. The error is about using useEffect in a server component in /react/primitive/src/Primitive.tsx.

anilmenawat avatar Dec 18 '23 23:12 anilmenawat

I had the same problem here, I was using Nodejs v20.10.0 and after switching to Nodejs v18.19.0 everything worked fine.

jdavmo avatar Dec 19 '23 03:12 jdavmo

Try this command npx shadcn-ui init It worked for me

marksikaundi avatar Dec 19 '23 08:12 marksikaundi

~Can you check which zod version is being installed?~

My bad (zod is in cli). I'll check it out.

shadcn avatar Dec 21 '23 17:12 shadcn

Hello, i have the same issue. Did you find any solution?

nahuepera5 avatar Jan 12 '24 12:01 nahuepera5

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

nahuepera5 avatar Jan 12 '24 13:01 nahuepera5

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

marksikaundi avatar Jan 12 '24 16:01 marksikaundi

Anyone reading this in 2024... check your node version. 🤙

kgcarroll avatar Jan 24 '24 04:01 kgcarroll

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 ?

artsiders avatar Feb 12 '24 06:02 artsiders

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

Damola180 avatar Apr 10 '24 19:04 Damola180

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

marksikaundi avatar Apr 10 '24 20:04 marksikaundi

Try this command npx shadcn-ui init It worked for me

Thank bro It work's . but npx shadcn-ui@latest init not working 😂

0xTanzim avatar May 19 '24 10:05 0xTanzim

Try this command npx shadcn-ui init It worked for me

Thank bro It work's . but npx shadcn-ui@latest init not working 😂

Also try to use NODEJS v18 LTS, works perfect.

marksikaundi avatar May 19 '24 11:05 marksikaundi

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.

shadcn avatar Jun 28 '24 23:06 shadcn

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' }

iamkashifkhn avatar Aug 07 '24 09:08 iamkashifkhn

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

marksikaundi avatar Aug 07 '24 11:08 marksikaundi