Reputation: 26
here is problem installing styled-components with npm install. please anyone help for the same or anyother way for install styled-components I used command: npm i styled-components -g But it is not working for me so please is here anyother way for same and why is not installing for me what can be problem.
Upvotes: 0
Views: 2216
Reputation: 1
The "npm install styled-components" works fine... just change the directory to the name of your react-app. for instance, if the name of your react app is "my-project", just type "cd my-project" into the terminal or command prompt. Then run "npm install styled-components". It worked just fine.
In my own case, The directory was
PS C:\Users\user\Desktop\poop>
all I did was to add "cd me" in front of PS C:\Users\user\Desktop\poop>
because "me" was the name of my create-react-app project
after the above step, you now have PS C:\Users\user\Desktop\poop\me>
Then run npm install styled-components
it would work
Upvotes: 0
Reputation: 1
I use the command without the -g and it works for me.
npm i styled-components
Upvotes: 0
Reputation: 455
Can you please remove node modules and try installing the same again using yarn this time?
If it is still not working please add more info about your question.
Upvotes: 3