0

I have a folder A where a piece of ts-node code works. But if I check the code (and its package.json and package-lock.json) out of my repo into a virgin folder B, and run npm clean-install, then when I run the same code it throws a runtime error that is likely due to some incompatible syntax of typescript or ts-node.

I'm forced to conclude that my node_modules subfolder in folder A must contain module versions that are not reflected in its package-lock.json.

Which leads to my question. Is there either:

  1. A way to compare the actual versions that are in node_modules against the versions listed in package-lock.json?
  2. A way to generate a package-lock.json directly from node_modules, so I can compare it with the package-lock.json in the repo?
LWixson
  • 199
  • 1
  • 12
  • Related: https://stackoverflow.com/questions/42371454/build-package-json-from-existing-node-modules-folder – Jens Apr 08 '22 at 04:04

0 Answers0