Declare 'react' as a depdency in `embla-carousel` package
See original GitHub issueFeature request is related to
- The React version
Is your feature request related to an issue?
We can’t use the package in a yarn pnp enabled project.
The resolver throws the following error:
embla-carousel tried to access react, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Describe the solution you’d like
Updating the embla-carousel/package.json
to move “react” from devDependencies
into dependencies
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Declare 'react' as a depdency in embla-carousel package #212
We can't use the package in a yarn pnp enabled project. The resolver throws the following error: embla-carousel tried to access react, but...
Read more >embla-carousel-react - npm
A lightweight carousel library with fluid motion and great swipe precision. Latest version: 7.0.2, last published: 5 days ago.
Read more >React | Embla Carousel
Learn how to setup Embla Carousel using React. ... React. Start by installing the Embla Carousel npm package and add it to your...
Read more >cms_base - NPM Package Overview - Socket - Socket.dev
Based on: React; Firebase; Mantine; Algolia; Tailwind; Wasabi. Instructions: First: yarn add cms_base. Most larger packages are included as peer dependencies ...
Read more >React : unique id or classname of array based on index of ...
this is a carousel made using embla-react-carousel. i want to add a certain id or classname of each object in array because i...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chitchu the dedicated react version is on its way (#220). This is what the
package.json
will look like.Hi Vicente (@chitchu),
Thank you for creating this issue. I don’t think the
react
package should be a dependency of theembla-carousel
package? It should ideally be a peerDependency, becauseembla-carousel
requires you to installreact
on your own. Embla shouldn’t include a duplicatereact
in the consumer project because this is known to cause a lot of problems. The reason why it’s not a peerDependency today has been discussed in the following issue #92.In the future, I’m hoping to separate the react version into a separate package called
embla-carousel-react
, but I haven’t had the time to do so. Doing that will make it possible to movereact
to peerDependencies.Best, David