Skip to content

pnpm can't resolve @storybook-vue/nuxt when deps not hoisted #920

@hacknug

Description

@hacknug

Environment

  • Operating System: Darwin
  • Node Version: v24.3.0
  • Nuxt Version: 4.0.0-rc.0
  • CLI Version: 3.25.1
  • Nitro Version: 2.11.13
  • Package Manager: pnpm@10.13.1
  • Builder: -
  • User Config: modules, devtools, compatibilityDate, eslint, storybook
  • Runtime Modules: @nuxt/eslint@1.5.2, @nuxt/image@1.10.0, @nuxt/scripts@0.11.9, @nuxt/test-utils@3.19.2, @nuxt/ui@3.2.0, @nuxtjs/storybook@8.4.2-29190898.ba4cb15
  • Build Modules: -

Reproduction

https://codesandbox.io/p/devbox/nuxt-storybook-repro-yzv2ch

Describe the bug

When using pnpm and installing the module on a project without an .npmrc file with shamefully-hoist=true (eg. creating a new project with the cli using the v4 template), the import type { StorybookConfig } from '@storybook-vue/nuxt' can't be resolved.

Additional context

Forcing --shamefully-hoist via cli or .npmrc solves the issue, although I don't think we should force users into doing this if everything else supports a non-hoisted installation.

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions