chore: restrict node version (#3120)
This commit is contained in:
1 parent
8bcc4d6a57
commit
05291a8a36
6 files changed
+43
-1
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import semver from 'semver';
|
||||
|
||||
import packageJson from '../package.json' assert { type: 'json' };
|
||||
|
||||
const { engines } = packageJson;
|
||||
|
||||
const version = engines.node;
|
||||
if (!semver.satisfies(process.version, version)) {
|
||||
console.log(
|
||||
`Required node version ${version} not satisfied with current version ${process.version}.`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in new issue
Block a user