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
Installing via Yarn (4.5.0 in this case) leads to error (chose React and Vite, don't know if other setups cause the same issue). Storybook starts up with error but no content shows up. See "Additional context".
Reproduction link
n/a
Reproduction steps
npm init to create dummy package.json
Follow instruction for Yarn at https://storybook.js.org/docs/get-started/install: yarn dlx storybook@latest init ← Note: You need Yarn >1 to run dlx and nodeLinker: node-modules inside .yarnrc.yml to install to node_modules directory
Answer all questions
Get warning: (node:13206) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
Get error: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from ./node_modules/@storybook/builder-vite/dist/index.js
kj@my-mbp sb-demo % yarn dlx storybook@latest init
➤ YN0000: · Yarn 4.5.0
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + storybook@npm:8.3.5, @esbuild/aix-ppc64@npm:0.23.1, @esbuild/android-arm64@npm:0.23.1, and 131 more.
➤ YN0000: └ Completed in 0s 662ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 111 packages were added to the project (+ 48.35 MiB).
➤ YN0000: └ Completed in 0s 333ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ esbuild@npm:0.23.1 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 0s 880ms
➤ YN0000: · Done with warnings in 1s 892ms
╭──────────────────────────────────────────────────────╮
│ │
│ Adding Storybook version 8.3.5 to your project.. │
│ │
╰──────────────────────────────────────────────────────╯
• Detecting project type. ✓
Installing dependencies...
➤ YN0000: · Yarn 4.5.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: · Done in 0s 44ms
We couldn't detect your project type. (code: UNDETECTED) You can specify a project type explicitly via `storybook init --type <type>`, see our docs on how to configure Storybook for your framework: https://storybook.js.org/docs/react/get-started/install✔ Do you want to manually choose a Storybook project type to install? … yes✔ Please choose a project type from the following list: › react✔ We were not able to detect the right builder for your project. Please select one: › Vite ✔ Getting the correct version of 11 packages ✔ Installing Storybook dependencies(node:12784) Warning: [Warning] The runtime detected new information in a PnP file; reloading the API instance (/Users/kjohnson/Desktop/sb-demo/.pnp.cjs)(Use `node --trace-warnings ...` to show where the warning was created). ✓Installing dependencies...➤ YN0000: · Yarn 4.5.0➤ YN0000: ┌ Resolution step➤ YN0000: └ Completed➤ YN0000: ┌ Post-resolution validation➤ YN0002: │ sb-demo@workspace:. doesn't provide react (p66b9d), requested by @storybook/addon-links and other dependencies.
➤ YN0002: │ sb-demo@workspace:. doesn't provide react-dom (pfed50), requested by @storybook/blocks and other dependencies.➤ YN0002: │ sb-demo@workspace:. doesn't provide vite (p9832e), requested by @storybook/react-vite.
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash>for details, where <hash> is the six-letter p-prefixed code.
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 211ms
➤ YN0000: ┌ Link step
➤ YN0031: │ One or more node_modules have been detected and will be removed. This operation may take some time.
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: · Done with warnings in 0s 328ms
attention => Storybook now collects completely anonymous telemetry regarding usage.
This information is used to shape Storybook's roadmap and prioritize features.You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://storybook.js.org/telemetry
╭──────────────────────────────────────────────────────────────────────────────╮
│ │
│ Storybook was successfully installed in your project! 🎉 │
│ To run Storybook manually, run yarn storybook. CTRL+C to stop. │
│ │
│ Wanna know more about Storybook? Check out https://storybook.js.org/ │
│ Having trouble or want to chat? Join us at https://discord.gg/storybook/ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Running Storybook
@storybook/core v8.3.5
(node:12838) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
=> Failed to build the preview
Error: @storybook/builder-vite tried to access vite (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.Required package: vite (via "vite/package.json")Required by: @storybook/builder-vite@virtual:3fd42c61ee445ba2474bf2d74e4f838fb27b6e801c81132c31d97ff317d0f961eaed92f0ac32b0c00decba5f617c5e9ac731bc504f917d76c10cd5646893fee6#npm:8.3.5 (via ./.yarn/__virtual__/@storybook-builder-vite-virtual-e2abc65a75/3/.yarn/berry/cache/@storybook-builder-vite-npm-8.3.5-01c4947b43-10c0.zip/node_modules/@storybook/builder-vite/dist/index.js)Ancestor breaking the chain: sb-demo@workspace:. at makeError (./.pnp.cjs:10127:34) at resolveToUnqualified (./.pnp.cjs:11704:21) at Object.resolveToUnqualified (./.pnp.cjs:11945:26) at resolve$1 (file://./.pnp.loader.mjs:2031:31) at nextResolve (node:internal/modules/esm/hooks:748:28) at Hooks.resolve (node:internal/modules/esm/hooks:240:30) at MessagePort.handleMessage (node:internal/modules/esm/worker:199:24) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:816:20) at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)WARN Broken build, fix the error above.WARN You may need to refresh the browser.✔ Would you like to help improve Storybook by sending anonymous crash reports? … nokj@my-mbp sb-demo % kj@my-mbp sb-demo % yarn storybook @storybook/core v8.3.5(node:13206) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.(Use `node --trace-deprecation ...` to show where the warning was created)info => Starting manager..info => Starting preview..=> Failed to build the previewError [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from ./node_modules/@storybook/builder-vite/dist/index.js at packageResolve (node:internal/modules/esm/resolve:839:9) at moduleResolve (node:internal/modules/esm/resolve:908:18) at defaultResolve (node:internal/modules/esm/resolve:1038:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38) at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:36) at TracingChannel.tracePromise (node:diagnostics_channel:337:14) at ModuleLoader.import (node:internal/modules/esm/loader:481:21) at defaultImportModuleDynamicallyForScript (node:internal/modules/esm/utils:227:31)WARN Broken build, fix the error above.WARN You may need to refresh the browser.kj@my-mbp sb-demo % ls -l node_modules/@storybook total 0drwxr-xr-x 7 kj staff 224 Oct 16 08:44 addon-actionsdrwxr-xr-x 7 kj staff 224 Oct 16 08:44 addon-backgroundsdrwxr-xr-x 6 kj staff 192 Oct 16 08:44 addon-controlsdrwxr-xr-x 15 kj staff 480 Oct 16 08:44 addon-docsdrwxr-xr-x 5 kj staff 160 Oct 16 08:44 addon-essentialsdrwxr-xr-x 6 kj staff 192 Oct 16 08:44 addon-highlightdrwxr-xr-x 8 kj staff 256 Oct 16 08:44 addon-interactionsdrwxr-xr-x 9 kj staff 288 Oct 16 08:44 addon-linksdrwxr-xr-x 7 kj staff 224 Oct 16 08:44 addon-measuredrwxr-xr-x 7 kj staff 224 Oct 16 08:44 addon-onboardingdrwxr-xr-x 7 kj staff 224 Oct 16 08:44 addon-outlinedrwxr-xr-x 6 kj staff 192 Oct 16 08:44 addon-toolbarsdrwxr-xr-x 7 kj staff 224 Oct 16 08:44 addon-viewportdrwxr-xr-x 5 kj staff 160 Oct 16 08:44 blocksdrwxr-xr-x 6 kj staff 192 Oct 16 08:44 builder-vitedrwxr-xr-x 6 kj staff 192 Oct 16 08:44 componentsdrwxr-xr-x 7 kj staff 224 Oct 16 08:44 coredrwxr-xr-x 7 kj staff 224 Oct 16 08:44 csfdrwxr-xr-x 5 kj staff 160 Oct 16 08:44 csf-plugindrwxr-xr-x 6 kj staff 192 Oct 16 08:44 globaldrwxr-xr-x 6 kj staff 192 Oct 16 08:44 iconsdrwxr-xr-x 5 kj staff 160 Oct 16 08:44 instrumenterdrwxr-xr-x 6 kj staff 192 Oct 16 08:44 manager-apidrwxr-xr-x 6 kj staff 192 Oct 16 08:44 preview-apidrwxr-xr-x 8 kj staff 256 Oct 16 08:44 reactdrwxr-xr-x 5 kj staff 160 Oct 16 08:44 react-dom-shimdrwxr-xr-x 6 kj staff 192 Oct 16 08:44 react-vitedrwxr-xr-x 5 kj staff 160 Oct 16 08:44 testdrwxr-xr-x 9 kj staff 288 Oct 16 08:44 themingkj@my-mbp sb-demo % ls -l node_modules/@storybook/builder-vite/disttotal 544-rw-r--r-- 1 kj staff 1226 Oct 16 08:44 index.d.ts-rw-r--r-- 1 kj staff 135523 Oct 16 08:44 index.js-rw-r--r-- 1 kj staff 134023 Oct 16 08:44 index.mjs
The text was updated successfully, but these errors were encountered:
Describe the bug
Installing via Yarn (4.5.0 in this case) leads to error (chose React and Vite, don't know if other setups cause the same issue). Storybook starts up with error but no content shows up. See "Additional context".
Reproduction link
n/a
Reproduction steps
npm init
to create dummy package.jsonyarn dlx storybook@latest init
← Note: You need Yarn >1 to rundlx
andnodeLinker: node-modules
inside.yarnrc.yml
to install to node_modules directory(node:13206) [DEP0040] DeprecationWarning: The
punycodemodule is deprecated. Please use a userland alternative instead.
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from ./node_modules/@storybook/builder-vite/dist/index.js
Installing via NPM
npx storybook@latest init
works, however (with punycode warning).System
Additional context
The text was updated successfully, but these errors were encountered: