question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.1.0 installs multiple versions of React

See original GitHub issue
> npm install
...
> npm ls react
react-color@2.1.0 /home/brad/Projects/casesandberg/react-color
├── react@15.0.2 
├─┬ react-context@0.0.3
│ └── react@0.13.3 
└─┬ reactcss@0.4.5
  └── react@0.14.8 

This is a minor issue, but one that we’ve found can bloat our build size if we’re not careful.

Repros on a fresh pull of master at f603122813b82eedfa45f04c86fb7f695c2e9b6f although interactions with external dependencies also influence the repro.

I’m less concerned about react-context because it’s listed in devDependencies and therefore only affects development of this package. However, reactcss is listed in dependencies and therefore gets installed by consumers of react-color - thus, consumers of react-color are also installing multiple versions of React at the moment.

The resolution is not a change in this repo, but it seems to impact react-color the most which is why I’m reporting it here. reactcss/master supports React 15 as of https://github.com/casesandberg/reactcss/pull/52, but a new version of the package has not yet been released. Once a new minor/patch version of reactcss is on npm, thanks to the ^0.4.3 rule consumers of react-color will no longer be installing two versions of React.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
islemastercommented, May 9, 2016

For anyone interested, here’s our temporary workaround by depending on our own fork until updated reactcss gets published.

1reaction
casesandbergcommented, Aug 24, 2016

The fix is live react-color@2.2.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to install multiple versions of package using npm
Hi, I've tried these step to install 2 package is: "react-native-track-player": "1.1.4" and "react-native-track-player": "1.1.8". It work well ...
Read more >
Use multiple versions of an npm package at the same time | Blog
With npm or yarn, you can install a package under a custom alias. This enables you to install multiple versions of a package...
Read more >
Hooks + multiple instances of React · Issue #13991 - GitHub
I had multiple instances of React by mistake. When trying to use hooks, got this error: hooks can only be called inside the...
Read more >
2.1.0 - react-scripts - npm
Install · Repository · Homepage · Version · License · Unpacked Size · Total Files · Issues.
Read more >
How To Check My React Version and Update It? - Upmostly
npm install –save react@<version>, where <version> is a variable. You should substitute it for the desired version of React. Let's take a look...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found