Struggling to install packages in custom-components package after the latest typescript 4.2.0 was included in packages.json

I just git cloned the latest streamlit custom packages file which added the 4.2.0 typescript version but I am getting dependency errors.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-scripts@3.4.1
npm ERR! Found: typescript@4.9.4
npm ERR! node_modules/typescript
npm ERR!   typescript@"^4.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@3.4.1
npm ERR! node_modules/react-scripts
npm ERR!   react-scripts@"3.4.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typescript@3.9.10
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^3.2.1" from react-scripts@3.4.1
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"3.4.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!

I have had to change it back to 3.8.0. Could someone please explain why this is the case?

Thanks.

2 Likes

Iā€™m also having this problem! Would appreciate any insights :slight_smile:

@Rushmore did switching your 4.2.0 typescript version back to 3.8.0 resolve your issue?

Yes it did.

Hi @Rushmore sorry for the late reply. Ok I will give that a go ā€¦ will see whether it causes clashes with other dependency errors I got!

1 Like

No problem!