1 | #!/usr/bin/env node
|
2 |
|
3 | const majorNodeVersion = parseInt(process.versions.node, 10);
|
4 | if (majorNodeVersion < 18) {
|
5 | console.error('To run Storybook you need to have Node.js 18 or higher');
|
6 | process.exit(1);
|
7 | }
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | process.once('uncaughtException', (error) => {
|
14 | if (error.message.includes('string-width')) {
|
15 | console.error(
|
16 | [
|
17 | '🔴 Error: It looks like you are having a known issue with package hoisting.',
|
18 | 'Please check the following issue for details and solutions: https://github.com/storybookjs/storybook/issues/22431#issuecomment-1630086092\n\n',
|
19 | ].join('\n')
|
20 | );
|
21 | }
|
22 |
|
23 | throw error;
|
24 | });
|
25 |
|
26 | require('../dist/generate.js');
|