1

I would like to update a 'handlebars' node module that is a dependency of Vue-Cli (see screenshot).

enter image description here

What's the correct way to do this?

Thank you

redshift
  • 4,815
  • 13
  • 75
  • 138

1 Answers1

1

Add a resolutions field to your package.json file and define your version overrides.

It will look like this

{
  ...
  "dependencies": {
    ...
  },
  "devDependencies": {
    ...
  },
  "resolutions": {
    "EXAMPLE_PACKAGE": "EXAMPLE_PACKAGE_NEEDED_VERSION"
  }
}

It shouldn't update the package in the dependency. But your application will use the needed version. It can be useful for example if some dependencies in your dependency have important security updates, and your dependency has not updated the version yet.

CyberEternal
  • 2,259
  • 2
  • 12
  • 31
  • 1
    great! you just reminded me im already doing this with other packages! let me test... – redshift Jul 21 '21 at 18:28
  • I also solve it this way, since sometimes, some dependencie's dependencies have important security updates, and your dependency has not updated the version yet. – CyberEternal Jul 21 '21 at 18:32