check-node-version
check-node-version copied to clipboard
Can't get this to work without changing the code. Semver is not callable
Trying to use this, and it's failing saying it can't run semver
as a function. I tracked it down to this code:
if (version) {
programInfo.version = semver(version);
}
If I change it to
if (version) {
programInfo.version = new semver.SemVer(version);
}
it does work.
I'm pretty new to npm and node, so I'm probably doing something wrong...