diff --git a/src/cli/cmds/audit.js b/src/cli/cmds/audit.js index 3435a8b..3ad2eed 100644 --- a/src/cli/cmds/audit.js +++ b/src/cli/cmds/audit.js @@ -3,6 +3,8 @@ const path = require('path'); const { files: {loadConfig}, } = require('@sandworm/utils'); +const semver = require('semver'); + const {getReport} = require('../..'); const onProgress = require('../progress'); const {getIssueCounts, failIfRequested} = require('../utils'); @@ -133,6 +135,12 @@ exports.handler = async (argv) => { const appPath = argv.path || process.cwd(); try { + if (semver.lt(process.versions.node, '14.19.0')) { + throw new UsageError( + `Sandworm requires Node >=14.19.0 (currently on ${process.versions.node})`, + ); + } + let isOutdated = false; (async () => {