Skip to content

Commit

Permalink
fix: required Node Version
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Jun 19, 2023
1 parent 08f9812 commit 4751ac4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/controllers/initializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ export async function create(
options = sessionOrOption;
}

const requiredNodeVersion = 16;
const currentNodeVersion = Number(process.versions.node.split('.')[0]);
if (currentNodeVersion < requiredNodeVersion) {
return reject(
`Outdated Node.js version. Node.js ${requiredNodeVersion} or higher is required. Please update Node.js.`
);
}

await checkUpdates();

const spinnies = getSpinnies({
Expand Down

0 comments on commit 4751ac4

Please sign in to comment.