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:
- A way to compare the actual versions that are in
node_modulesagainst the versions listed inpackage-lock.json? - A way to generate a
package-lock.jsondirectly fromnode_modules, so I can compare it with thepackage-lock.jsonin the repo?