Faire
Faire

Reputation: 1011

Why does npm isntallation of styled-components for React Native fail?

I am trying to install styled components for a React Native project:

C:\Projects\Native1>npm install --save styled-components

The installation fails with following error:

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Projects\Native1\node_modules\camelize
npm ERR! dest C:\Projects\Native1\node_modules\.camelize.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Projects\Native1\node_modules\camelize' -> 'C:\Projects\Native1\no
de_modules\.camelize.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

The directory really doesn't exist in the node_modules folder. What can I do install the module succesfully?

Upvotes: 0

Views: 302

Answers (2)

sareno
sareno

Reputation: 696

I had the same problem, in my case, Docker's storage is full so I have to do a cleanup like so:

$ docker system prune -a

Upvotes: 0

Bisma Azher
Bisma Azher

Reputation: 749

clean cache from your nodemodules folder

npm cache clean --force

Or

delete your nodemodules folder

then run

npm i styled-components

Upvotes: 1

Related Questions