Skip to content

Commit

Permalink
Merge pull request #24063 from storybookjs/yann/more-context-on-core-…
Browse files Browse the repository at this point in the history
…events-comments

Maintenance: Add more context to explanation in core-events errors
  • Loading branch information
yannbf authored Sep 4, 2023
2 parents 43f4345 + 24b837c commit 1d93663
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
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');

0 comments on commit 1d93663

Please sign in to comment.