Search code examples
npmjsdatanpm-shrinkwrapjs-data-angular

How to solve dependency conflict between js-data-angular and js-data-http


I'm currently working on a project, the project has 2 npm packages installed:
js-data-http and js-data-angular.

The problem is js-data-http requires js-data@>=3.0.0 and js-data-angular requires js-data@>=2.0.0 <3. I've looked through all versions of both packages and couldn't find any version that matches the dependency for js-data.

With that dependency conflict I can't generate a npm-shrinkwrap, has anyone else gone through this?


Solution

  • I've figured it out, I had to set the packages in package.json to these versions:

    "jquery": "2.2.1",
    "js-data": "2.8.2",
    "js-data-angular": "3.1.0"
    

    Then I was able to successfully generate npm-shrinkwrap.json without conflicts, I am not sure why npm wasn't able to automatically install these three packages without conflicts though.