NPM install issue

NPM install issue

dmcleandmclean Posts: 55Questions: 2Answers: 0

Description of problem: I'm working on a project that is currently using a very old version (1.10.3) and there is an odd problem, so I was trying to gradually move to newer versions, fixing issues that I run into along the way.

The project is currently using a copy of DataTables included in the git repository (yuck) so I was trying to move to installing it via NPM. However, the command line below keeps installing the current version 2.1.7 (which does not even remotely work).

nom install datables.net-zf@1.10.9

Does anybody know why I would be unable to install the specific version I want to try first?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Yes, datables.net-zf (and all the others) in v1 had a mistake in their dependencies unfortunately. The required datatables.net > 1.x.y. The upshot of which is that they will try to install the latest version of datatables.net. The dependency for the styling package should have had the version exactly matching, which it does not, but it means old versions have the problem you are seeing.

    The way to fix it, is to explicitly install the old version of the core package, which will meet the dependency requirement - e.g.:

    npm install datables.net@1.10.9 datables.net-zf@1.10.9
    

    Allan

  • dmcleandmclean Posts: 55Questions: 2Answers: 0

    Thank you!

Sign In or Register to comment.