Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance: Add more context to explanation in core-events errors #24063

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions code/lib/core-events/manager-errors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// This is required for projects that require paths such as `@storybook/core-events/manager-errors`
// but in CJS, while not in ESM mode. Else an error like this will occur:
// This is required for compatibility in projects that don't support the exports map field (e.g. Jest 27),
// so when require paths such as `@storybook/core-events/manager-errors`,
// An error like this will occur:
// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/manager-errors.js'
// https://github.com/storybookjs/storybook/pull/24038#issuecomment-1704684432
module.exports = require('./dist/errors/manager-errors');
6 changes: 4 additions & 2 deletions code/lib/core-events/preview-errors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// This is required for projects that require paths such as `@storybook/core-events/preview-errors`
// but in CJS, while not in ESM mode. Else an error like this will occur:
// This is required for compatibility in projects that don't support the exports map field (e.g. Jest 27),
// so when require paths such as `@storybook/core-events/preview-errors`,
// An error like this will occur:
// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/preview-errors.js'
// https://github.com/storybookjs/storybook/pull/24038#issuecomment-1704684432
module.exports = require('./dist/errors/preview-errors');
6 changes: 4 additions & 2 deletions code/lib/core-events/server-errors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// This is required for projects that require paths such as `@storybook/core-events/server-errors`
// but in CJS, while not in ESM mode. Else an error like this will occur:
// This is required for compatibility in projects that don't support the exports map field (e.g. Jest 27),
// so when require paths such as `@storybook/core-events/server-errors`,
// An error like this will occur:
// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/server-errors.js'
// https://github.com/storybookjs/storybook/pull/24038#issuecomment-1704684432
module.exports = require('./dist/errors/server-errors');
Loading