LucasBassetti / react-simple-chatbot

:speech_balloon: Easy way to create conversation chats
https://lucasbassetti.com.br/react-simple-chatbot/
MIT License
1.74k stars 602 forks source link

Issue between react-simple-chatbot and styled-components #381

Open GastonFlorenciano opened 11 months ago

GastonFlorenciano commented 11 months ago

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: pg-henry-front@0.1.0 npm ERR! Found: styled-components@5.3.11 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 react-simple-chatbot@0.6.1 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.

Dharmveer47 commented 11 months ago

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

danielV1213 commented 11 months ago

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?

Dharmveer47 commented 10 months ago

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.

danielV1213 commented 10 months ago

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.

salahbm commented 10 months ago

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