mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-21 10:01:43 +03:00
16 lines
439 B
JavaScript
16 lines
439 B
JavaScript
const semver = await import('semver').catch(
|
|
() => import('../packages/backend/server/node_modules/semver/index.js')
|
|
);
|
|
|
|
import packageJson from '../package.json' with { 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);
|
|
}
|