You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a npm monorepo setup with workspaces but we only have 1 package with HTML storybook set up. Our plan for the near future is to add more workspaces with other frameworks and also create storybooks for those workspaces. During upgrade from 7.0.20 to 7.1.1, if we run the migration for wrap-require, starting storybook fails and outputs this error:
@storybook/cli v7.1.1
ERR! SyntaxError: Cannot use import statement outside a module
ERR! at Object.compileFunction (node:vm:352:18)
ERR! at wrapSafe (node:internal/modules/cjs/loader:1033:15)
ERR! at Module._compile (node:internal/modules/cjs/loader:1069:27)
ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
ERR! at Object.newLoader (/[compname-redacted]/design-system/node_modules/esbuild-register/dist/node.js:2262:9)
ERR! at Object.extensions..js (/[compname-redacted]/design-system/node_modules/esbuild-register/dist/node.js:4807:24)
ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
ERR! at Module.require (node:internal/modules/cjs/loader:1005:19)
ERR! at require (node:internal/modules/cjs/helpers:102:18)
ERR! SyntaxError: Cannot use import statement outside a module
ERR! at Object.compileFunction (node:vm:352:18)
ERR! at wrapSafe (node:internal/modules/cjs/loader:1033:15)
ERR! at Module._compile (node:internal/modules/cjs/loader:1069:27)
ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
ERR! at Object.newLoader (/[compname-redacted]/design-system/node_modules/esbuild-register/dist/node.js:2262:9)
ERR! at Object.extensions..js (/[compname-redacted]/design-system/node_modules/esbuild-register/dist/node.js:4807:24)
ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
ERR! at Module.require (node:internal/modules/cjs/loader:1005:19)
ERR! at require (node:internal/modules/cjs/helpers:102:18)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
npm ERR! Lifecycle script `storybook` failed with error:
npm ERR! Error: command failed
npm ERR!in workspace: @cbpds/[email protected]
npm ERR! at location: /[compname-redacted]/design-system/packages/vanilla
Testing this further, upgrading the workspace without running the wrap-require migration works fine, including adding another workspace with storybook, but I wanted see if there was any insight as storybook monorepo support is important for this project. We don't use Nx or Turborepo for our monorepo.
Describe the bug
We have a
npm
monorepo setup with workspaces but we only have 1 package with HTML storybook set up. Our plan for the near future is to add more workspaces with other frameworks and also create storybooks for those workspaces. During upgrade from 7.0.20 to 7.1.1, if we run the migration forwrap-require
, starting storybook fails and outputs this error:Testing this further, upgrading the workspace without running the
wrap-require
migration works fine, including adding another workspace with storybook, but I wanted see if there was any insight as storybook monorepo support is important for this project. We don't use Nx or Turborepo for our monorepo.To Reproduce
https://github.com/US-CBP/design-system
npm install
npm vanilla-build
cd packages/vanilla
npx storybook@latest upgrade
wrap-require
npm run storybook
System
Additional context
No response
The text was updated successfully, but these errors were encountered: