mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-22 15:52:27 +03:00
14 lines
348 B
JavaScript
14 lines
348 B
JavaScript
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);
|
|
}
|