mswjs / msw-storybook-addon

Mock API requests in Storybook with Mock Service Worker.
https://msw-sb.vercel.app
MIT License
408 stars 39 forks source link

Package subpath './package.json' is not defined by "exports"... #147

Closed tamjankowska closed 6 months ago

tamjankowska commented 7 months ago

Since upgrading from the canary version to the major version I'm seeing this error when building Chromatic.

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /node_modules/msw-storybook-addon/package.json
                  at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
                  at new NodeError (node:internal/errors:405:5)
                  at exportsNotFound (node:internal/modules/esm/resolve:366:10)
                  at packageExportsResolve (node:internal/modules/esm/resolve:713:9)
                  at resolveExports (node:internal/modules/cjs/loader:590:36)
                  at Module._findPath (node:internal/modules/cjs/loader:664:31)
                  at Module._resolveFilename (node:internal/modules/cjs/loader:1126:27)
                  at Module._resolveFilename (/home/runner/work/house/house/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/node.js:4799:36)
                  at Function.resolve (node:internal/modules/helpers:188:19)
                  at getAbsolutePath (/.storybook/main.ts:33:26)
                  at Object.<anonymous> (/.storybook/main.ts:11:5)
                  at Module._compile (node:internal/modules/cjs/loader:1364:14)
                  at Module._compile (/home/runner/work/house/house/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/node.js:2258:26)
                  at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
                  at Object.newLoader [as .ts] (/home/runner/work/house/house/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/node.js:2262:9)
                  at Module.load (node:internal/modules/cjs/loader:1203:32)
                  at Module._load (node:internal/modules/cjs/loader:1019:12)
                  at Module.require (node:internal/modules/cjs/loader:1231:19)
                  at require (node:internal/modules/helpers:177:18)
                  at interopRequireDefault (/home/runner/work/house/house/node_modules/.pnpm/@storybook+core-common@8.0.9/node_modules/@storybook/core-common/dist/index.js:6:21)
                  at serverRequire (/home/runner/work/house/house/node_modules/.pnpm/@storybook+core-common@8.0.9/node_modules/@storybook/core-common/dist/index.js:6:373)
                  at loadMainConfig (/home/runner/work/house/house/node_modules/.pnpm/@storybook+core-common@8.0.9/node_modules/@storybook/core-common/dist/index.js:16:3779)
                  at async buildStaticStandalone (/home/runner/work/house/house/node_modules/.pnpm/@storybook+core-server@8.0.9_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/core-server/dist/index.js:24:8530)
                  at async withTelemetry (/home/runner/work/house/house/node_modules/.pnpm/@storybook+core-server@8.0.9_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/core-server/dist/index.js:28:3579)
                  at async build (/home/runner/work/house/house/node_modules/.pnpm/@storybook+cli@8.0.9_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/cli/dist/generate.js:669:1409)
                  at async Command.<anonymous> (/home/runner/work/house/house/node_modules/.pnpm/@storybook+cli@8.0.9_react-dom@18.2.0_react@18.2.0/node_modules/@storybook/cli/dist/generate.js:672:[150](https://github.com/TheModernHouse/house/actions/runs/8816918117/job/24202109422?pr=215#step:5:151))
github-actions[bot] commented 6 months ago

:rocket: Issue was released in v2.0.1 :rocket: