0

We have made react project a year ago using bootstrap 4.1.3 and for enhancement now fetching same code from server and adding new feature but the css shows issues .The code is server css looks different than the local .to give a brief more css is added in local and looks different than the live .As we are also updating npm bootstarp module is updated to 4.3.1 and i believe this is causing issue with css .

I tried to change the dependencies and npm install which installs the latest version of bootstrap which is 4.3.1 .Can i install only 4.1.3 during npm install or node module install

2 Answers2

0

You can install any version of node module by mentioning it's version during installation as:

npm install <package>@<version>

Delete your old node modules of react-bootstrap. Then you can stick to a older version of react-bootstrap by:

npm install react-bootstrap@1.0.0-beta.9
npm install boostrap@4.3.1
Max Schmitt
  • 2,529
  • 1
  • 12
  • 26
Abhinav Kinagi
  • 3,653
  • 2
  • 27
  • 43
0

From what i can understand is that you have some complilers and they are getting the packages from node_modules and then when you are running 'npm install' this is updating all your packages.

@Max Shmitt is correct you can do the npm install [packagename]@[version] and that will be set in your project.

To help if you are outsourcing work on your application, you can further user npm shrinkwrap more detail here.

One you have set you packages you can run this command in the terminal at the root of your project to then lock all the packages at their current version number. That way if you ever re-run npm install it should look at this json package and then install all your dev requriements from that set point