"engineStrict" , "" . Node, :
You call this function in your server code. It uses a regular expression to check the version of Node using the eremzeit response. It throws an error if it does not use the corresponding version:
const checkNodeVersion = version => {
const versionRegex = new RegExp(`^${version}\\..*`);
const versionCorrect = process.versions.node.match(versionRegex);
if (!versionCorrect) {
throw Error(
`Running on wrong Nodejs version. Please upgrade the node runtime to version ${version}`
);
}
};
using:
checkNodeVersion(8)
source
share