I have a node app built with an unknown node and npm version. Is there any way to guess the version, or at least a version range, from package-lock.json?
I do have "lockfileVersion": 1,, which means npm v5 or v6. Any way I can get more granularity?
The reason I need it is, I am getting a bunch of errors like these when running ts-node, unless I delete and rebuild package-lock.json. Which I'd rather not do, for various reasons.
ts.Debug.assert(typeof typeReferenceDirectiveName === "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");
Simply search for "@types/node" inside package.json. It will give you node version used. Now search the relative npm version installed for the node version.
"@types/node": {
"version": "16.9.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.4.tgz",
"integrity": "sha512-KDazLNYAGIuJugdbULwFZULF9qQ13yNWEBFnfVpql......",
"dev": true
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With