@TreeFall1

Почему не запускается storybook?

У меня проект на Next.js и typescript. Использую yarn. Когда пытаюсь запустить сторибук получаю ошибку:
C:\Users\PC\Documents\GitHub\AimProxy\hit-proxy-migrate\node_modules\cli-table3\src\utils.js:1
const stringWidth = require('string-width');
                    ^

Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\PC\Documents\GitHub\AimProxy\hit-proxy-migrate\node_modules\string-width\index.js from C:\Users\PC\Documents\GitHub\AimProxy\hit-proxy-migrate\node_modules\cli-table3\src\utils.js not supported.
Instead change the require of index.js in C:\Users\PC\Documents\GitHub\AimProxy\hit-proxy-migrate\node_modules\cli-table3\src\utils.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (C:\Users\PC\Documents\GitHub\AimProxy\hit-proxy-migrate\node_modules\cli-table3\src\utils.js:1:21) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v21.7.2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Как исправить?
  • Вопрос задан
  • 23 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы