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

Cannot build Storybook after version 8.0.3-alpha.3 #804

Open
obulat opened this issue Oct 10, 2024 · 0 comments
Open

Cannot build Storybook after version 8.0.3-alpha.3 #804

obulat opened this issue Oct 10, 2024 · 0 comments
Labels
type: bug Something isn't working

Comments

@obulat
Copy link
Contributor

obulat commented Oct 10, 2024

Environment

Nuxt project info:


  • Operating System: Linux
  • Node Version: v20.17.0
  • Nuxt Version: 3.13.1
  • CLI Version: 3.13.1
  • Nitro Version: 2.9.7
  • Package Manager: pnpm@9.5.0
  • Builder: -
  • User Config: srcDir, serverDir, devServer, imports, compatibilityDate, css, runtimeConfig, debug, experimental, modules, routeRules, robots, tailwindcss, i18n, storybook, vite
  • Runtime Modules: @pinia/nuxt@0.5.5, @nuxtjs/i18n@8.5.5, @nuxtjs/tailwindcss@6.12.1, @nuxtjs/plausible@1.0.3, @nuxtjs/storybook@8.3.1, @nuxt/test-utils/module@3.14.1, @nuxtjs/sitemap@5.3.5, @nuxtjs/robots@4.1.3
  • Build Modules: -

Storybook: above v.8.3.0-alpha.3

Reproduction

https://github.com/WordPress/openverse/actions/runs/11260782126/job/31312901641?pr=5025

Describe the bug

I tried updating nuxt/storybook to the latest version (to move away from the nightly) in Openverse. The dev mode works fine, but building the storybook fails with the error given below.

I tested with different versions of Storybook, and the error appears in v8.3.0-alpha.4 (and build works fine with v8.3.0-alpha.3).

From v8.3.0-alpha.4 changelog, it seems that [28519] is the biggest PR that might have changed something with the way CJS/mjs files are loaded.

playwright-1  | [WebServer] SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: @storybook-vue/nuxt/preset.
playwright-1  | 
playwright-1  | Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
playwright-1  | 
playwright-1  | If you believe this is a bug, please open an issue on Github.
playwright-1  | 
playwright-1  | /node_modules/.pnpm/ufo@1.5.4/node_modules/ufo/dist/index.mjs:630
playwright-1  | export { $URL, cleanDoubleSlashes, createURL, decode, decodePath, decodeQueryKey, decodeQueryValue, encode, encodeHash, encodeHost, encodeParam, encodePath, encodeQueryItem, encodeQueryKey, encodeQueryValue, getQuery, hasLeadingSlash, hasProtocol, hasTrailingSlash, isEmptyURL, isEqual, isNonEmptyURL, isRelative, isSamePath, isScriptProtocol, joinRelativeURL, joinURL, normalizeURL, parseAuth, parseFilename, parseHost, parsePath, parseQuery, parseURL, resolveURL, stringifyParsedURL, stringifyQuery, withBase, withFragment, withHttp, withHttps, withLeadingSlash, withProtocol, withQuery, withTrailingSlash, withoutBase, withoutFragment, withoutHost, withoutLeadingSlash, withoutProtocol, withoutTrailingSlash };
playwright-1  | ^^^^^^
playwright-1  | 
playwright-1  | SyntaxError: Unexpected token 'export'
playwright-1  |     at wrapSafe (node:internal/modules/cjs/loader:1281:20)
playwright-1  |     at Module._compile (node:internal/modules/cjs/loader:1321:27)
playwright-1  |     at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
playwright-1  |     at Object.newLoader [as .mjs] (./node_modules/.pnpm/esbuild-register@3.6.0_esbuild@0.23.1/node_modules/esbuild-register/dist/node.js:2262:9)
playwright-1  |     at Module.load (node:internal/modules/cjs/loader:1208:32)
playwright-1  |     at Module._load (node:internal/modules/cjs/loader:1024:12)
playwright-1  |     at Module.require (node:internal/modules/cjs/loader:1233:19)
playwright-1  |     at require (node:internal/modules/helpers:179:18)
playwright-1  |     at Object.<anonymous> (./node_modules/.pnpm/mlly@1.7.2/node_modules/mlly/dist/index.cjs:6:13)
playwright-1  |     at Module._compile (node:internal/modules/cjs/loader:1358:14)
playwright-1  | 
playwright-1  | More info: 
playwright-1  | 
playwright-1  |     at loadPreset (./node_modules/.pnpm/@storybook+core@8.3.5/node_modules/@storybook/core/dist/common/index.cjs:139445:13)

You can see this in our CI run: https://github.com/WordPress/openverse/actions/runs/11260782126/job/31312901641?pr=5025

Additional context

I tried updating the module to nightly, but still got the same error

@obulat obulat added the type: bug Something isn't working label Oct 10, 2024
@obulat obulat changed the title Cannot build Storybook using the latest version Cannot build Storybook after version 8.0.3-alpha.3 Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant