bit icon indicating copy to clipboard operation
bit copied to clipboard

How get different versions of package in existing project with package.json

Open KelvinOm opened this issue 2 years ago • 2 comments

Description

I have existing project with package.json and React 15. I want to use Bit workspace with React 18. I tried to use variant for this but after bit install i got only 18.2.0 version in root node_modules.

2022-07-01!UNITO-UNDERSCORE!08-53-14

Could you help me to get node_modules with react 18 in components folder?

  • Bit version: 0.0.777
  • Node version: 16.15.1
  • Platform: MacOs

Context and additional information

Repo for reproduce https://github.com/KelvinOm/bit

KelvinOm avatar Jul 01 '22 04:07 KelvinOm

Do you want to use both react 15 and 18 in the same workspace?

GiladShoham avatar Jul 04 '22 15:07 GiladShoham

@GiladShoham Yes. I want migrate my old codebase step by step to new React with components and old app have to work on React 15 without any changes. How can I achieve this?

KelvinOm avatar Jul 04 '22 17:07 KelvinOm

this is only possible when using only bit to manage dependencies. sadly package.json does not support it.

itaymendel avatar Mar 06 '23 07:03 itaymendel