1

I know the title is confusing but I wasn't sure how to word my issue...

I am using a package in my App called "react-dnd-html5-backend". This specific package has a dependency called "autobind-decorator". autobind-decorator recently posted an update to their package that introduced conflicts in a few spots in my App. I would like to specify that "react-dnd-html5-backend" use the exact version that I know is compatible wit my code. Is there a way to specify that in my package.json file? To specify the version of "autobind-decorator" that "react-dnd-html5-backend" uses while in my application?

  • 1
    Possible duplicate of [How do I override nested NPM dependency versions?](https://stackoverflow.com/questions/15806152/how-do-i-override-nested-npm-dependency-versions) – jonrsharpe Nov 05 '18 at 21:16

2 Answers2

1

Adding autobind-decorator with a specific version as a dependency into your project's package.json will force to install that version.

Note that react-dnd-html5-backend should support to use autobind-decorator version, if not it will cause a version conflict error.

Gonzalo Matheu
  • 8,984
  • 5
  • 35
  • 58
0

Thanks Gonzalo! I believe I tried that but was unable to override the version used by "react-dnd-html5-backend" In my impatience I actually found a different solution that I figured I should post in case anyone else runs into the same problem. It looks like you can specify the version of a nested package by using the resolutions field of the package.json:

https://github.com/yarnpkg/rfcs/pull/68/files

Example:
"resolutions": {
    "**/autobind-decorator": "2.1.0"
  }