npm dependency issue with datatables.net-responsive and datatables.net-select
npm dependency issue with datatables.net-responsive and datatables.net-select
bturgeon
Posts: 3Questions: 0Answers: 0
In trying to run npm install today, we encountered some errors. It seems the dependencies specified in package.json on datatables.net-responsive (version 2.5.0) and datatables.net-select (version 1.7.0) is "datatables.net": ">=1.13.4" and is therefore now pulling in datatables.net 2.0 which is incompatible.
Replies
Thank you for flagging this up and apologies for the errors. I'll need to do a patch release of the older versions of these plugins to tighten up their dependency versions. Unfortunately, that isn't as simple as
npm publish
since I need to account for the CDN, Nuget and all of that, but I think that is an important point to fix.Until I can do that, specify a specific version of DataTables - 1.13.10 is the latest in the 1.x series:
Allan
Out of interest, can you show me the DataTables dependencies of your package.json file? Have you specified a specific version of Select or Responsive, but not DataTables? I'm wondering why DataTables would have updated, but not the other components.
Allan
Hi Allan,
The dependencies in our package.json are:
"datatables.net-select-bs4" was causing "datatables.net-select" v1.7.0 to get included, and within that package in node_modules was it's own node_modules folder containing datatables v.2.0 since it's dependencies listed
"datatables.net": ">=1.13.4"
In case anyone else encounters this, we were able to fix the build in our set up with the following in package.json
Ah! You aren't doing a flat node_modules structure. Thank you for the clarification and also for posting the workaround! Hopefully there won't be many hit by this error. I know now how to tighten up my dependency versions. Apologies again!
Allan
All good. Thanks for the quick response!