Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for React 18 #88

Closed
1 task
YuLingCheng opened this issue May 2, 2022 · 4 comments
Closed
1 task

Support for React 18 #88

YuLingCheng opened this issue May 2, 2022 · 4 comments

Comments

@YuLingCheng
Copy link

YuLingCheng commented May 2, 2022

Overview

Currently the library only supports react "^17.0.2".

  • Will the library easily work with react 18?
  • If yes, could we allow this version in the peer dependencies?
  • If no, is there a plan and ETA to have this library work with react 18?

Other naive question, do we need a peer dependency on react for this library?

Linked to #77 (comment)

Thanks a lot!

Motivation

What inspired this enhancement? What makes you think this should be included?

Would be great to be able to use this library with the latest supported react version

Labels

  • Add the Type: Enhancement label to this issue. ➡️ Unable to add a label sorry
@samuelOsborne
Copy link
Member

Hi @YuLingCheng, please try out v3.4.5 which changes how the peer deps work, works with react 18 on my end. Cheers

https://www.npmjs.com/package/@lottiefiles/react-lottie-player/v/3.4.5

@YuLingCheng
Copy link
Author

Hello @samuelOsborne !
Thanks a lot for the very quick response 😃

I can confirm that I can install v3.4.5 on a react 18 app ✅ , but I have the following warnings when building my app ⚠️ :

WARNING in ./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/ColorPicker.tsx' file: Error: ENOENT: no such file or directory, open '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/ColorPicker.tsx'

WARNING in ./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/Controls.tsx' file: Error: ENOENT: no such file or directory, open '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/Controls.tsx'

WARNING in ./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/Player.tsx' file: Error: ENOENT: no such file or directory, open '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/Player.tsx'

WARNING in ./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/Popover.tsx' file: Error: ENOENT: no such file or directory, open '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/Popover.tsx'

WARNING in ./node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/Seeker.tsx' file: Error: ENOENT: no such file or directory, open '/Users/yulingcheng/Pigment/test-react-18/node_modules/@lottiefiles/react-lottie-player/src/Seeker.tsx'

@samuelOsborne
Copy link
Member

@YuLingCheng This warning isn't related to the react version, we already have a ticket for it here:
#86

I'll post updates for the warning on that ticket, we're working on a fix for it.

If it's ok with you i'm going to close this issue and use the one I linked as this one has been solved!

Cheers

@YuLingCheng
Copy link
Author

Yes perfect, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants