react-simple-chatbot icon indicating copy to clipboard operation
react-simple-chatbot copied to clipboard

Issue between react-simple-chatbot and styled-components

Open GastonFlorenciano opened this issue 2 years ago • 5 comments

I ran 'npm install' and threw the next error:

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/styled-components npm ERR! styled-components@"^5.3.11" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer styled-components@"^4.0.0" from [email protected] npm ERR! node_modules/react-simple-chatbot npm ERR! react-simple-chatbot@"^0.6.1" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\Usuario\AppData\Local\npm-cache_logs\2023-12-03T20_06_56_961Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\Usuario\AppData\Local\npm-cache_logs\2023-12-03T20_06_56_961Z-debug-0.log

I changed styled-components version to "^4.0.0" because the docs say that's the styled-components version compatible with react-simple-chatbot, but the error persists, I'd be grateful if anybody brings some help.

GastonFlorenciano avatar Dec 03 '23 20:12 GastonFlorenciano

when you install use npm install --legacy-peer-deps that way it's pick compatible version

Dharmveer47 avatar Dec 14 '23 18:12 Dharmveer47

when you install use npm install --legacy-peer-deps that way it's pick compatible version

It still did not work for me. I am using Node.js 14.19.0; is it maybe because of that?

danielV1213 avatar Dec 29 '23 15:12 danielV1213

when you install use npm install --legacy-peer-deps that way it's pick compatible version

It still did not work for me. I am using Node.js 14.19.0; is it maybe because of that?

You can use the latest node if possible. and there is one more suggestion if you are trying to create a static bot then it's ok. otherwise, do not use it.

Dharmveer47 avatar Jan 07 '24 23:01 Dharmveer47

Thank you for answering! It was indeed the version I was using. And also thank you for the suggestion; I am using it as a static chatbot so it fits perfectly.

danielV1213 avatar Jan 08 '24 02:01 danielV1213

styled-components is used under the hood for this library, so --legacy-peer-deps may not solve the issue. Try npm install styled-components

salahbm avatar Jan 18 '24 13:01 salahbm