Skip to content

Commit

Permalink
Merge pull request #26312 from storybookjs/valentin/restrict-usage-of…
Browse files Browse the repository at this point in the history
…-node

CLI: Update minimum Node.js version requirement
  • Loading branch information
valentinpalkovic authored Mar 5, 2024
2 parents 6701349 + dc07edd commit 4df8934
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/lib/cli/bin/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node

const majorNodeVersion = parseInt(process.version.toString().replace('v', '').split('.')[0], 10);
if (majorNodeVersion < 16) {
console.error('To run storybook you need to have node 16 or higher');
const majorNodeVersion = parseInt(process.versions.node, 10);
if (majorNodeVersion < 18) {
console.error('To run Storybook you need to have Node.js 18 or higher');
process.exit(1);
}

Expand Down

0 comments on commit 4df8934

Please sign in to comment.