diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 8dbcdb6b8c9c..74ab0adb636e 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -61,6 +61,7 @@ "@ndelangen/get-tarball": "^3.0.7", "@storybook/codemod": "workspace:*", "@storybook/core-common": "workspace:*", + "@storybook/core-events": "workspace:*", "@storybook/core-server": "workspace:*", "@storybook/csf-tools": "workspace:*", "@storybook/node-logger": "workspace:*", diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index 56aad7f9f473..d6dd5a49d7fd 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -44,6 +44,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { + "@storybook/core-events": "workspace:*", "@storybook/node-logger": "workspace:*", "@storybook/types": "workspace:*", "@types/find-cache-dir": "^3.2.1", diff --git a/code/lib/core-events/manager-errors.js b/code/lib/core-events/manager-errors.js new file mode 100644 index 000000000000..6a1ce1522c1b --- /dev/null +++ b/code/lib/core-events/manager-errors.js @@ -0,0 +1,4 @@ +// 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: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/manager-errors.js' +module.exports = require('./dist/errors/manager-errors'); diff --git a/code/lib/core-events/preview-errors.js b/code/lib/core-events/preview-errors.js new file mode 100644 index 000000000000..a98055ba796d --- /dev/null +++ b/code/lib/core-events/preview-errors.js @@ -0,0 +1,4 @@ +// 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: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/preview-errors.js' +module.exports = require('./dist/errors/preview-errors'); diff --git a/code/lib/core-events/server-errors.js b/code/lib/core-events/server-errors.js new file mode 100644 index 000000000000..5f4eb31a408c --- /dev/null +++ b/code/lib/core-events/server-errors.js @@ -0,0 +1,4 @@ +// 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: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/server-errors.js' +module.exports = require('./dist/errors/server-errors'); diff --git a/code/yarn.lock b/code/yarn.lock index 6c80e860b68a..3caa8171c40e 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6571,6 +6571,7 @@ __metadata: "@storybook/client-api": "workspace:*" "@storybook/codemod": "workspace:*" "@storybook/core-common": "workspace:*" + "@storybook/core-events": "workspace:*" "@storybook/core-server": "workspace:*" "@storybook/csf-tools": "workspace:*" "@storybook/node-logger": "workspace:*" @@ -6719,6 +6720,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/core-common@workspace:lib/core-common" dependencies: + "@storybook/core-events": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" "@types/find-cache-dir": ^3.2.1