Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get "npm ERR! code ENOENT" when trying to install shadcn ui

I am creating a small project with vite and I keep getting this error when I try to run npx shadcn-ui@latest init:

npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\user\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\user\AppData\Roaming\npm'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
like image 975
Being47 Avatar asked Oct 24 '25 06:10

Being47


1 Answers

Create a folder npm in C:\Users\user-name\AppData\Roaming, and then redo the command.

This allows the package to be seen in files it runs through.

like image 102
Deepit Amin Avatar answered Oct 25 '25 22:10

Deepit Amin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!