Hey! Basically Storybook released a minor that breaks the module. I'm sorry for not submitting a really comprehensive issue, I'm a bit in a hurry right now, hit me up if anything!
@nuxtjs/storybook: v3.3.1
nuxt: v2.15.3
node: v14.15.3
npm: v6.14.9
yarn: v1.22.10
N/A
npx create-nuxt-app repro-252cd repro-252yarn add --dev @nuxtjs/storybook (or: npm install --save-dev @nuxtjs/storybooknpx nuxt storybook@nuxtjs/storybook should be working.
lihbr@mbp-lucie test-storybook % yarn nuxt storybook
yarn run v1.22.10
$ /Users/lihbr/Desktop/test-storybook/node_modules/.bin/nuxt storybook
WARN [email protected] is installed but ^7.0.32 is expected 21:33:52
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module โ@storybook/vue/dist/server/optionsโ
Require stack:
- /Users/lihbr/Desktop/test-storybook/node_modules/@nuxtjs/storybook/dist/index.js
- /Users/lihbr/Desktop/test-storybook/node_modules/@nuxtjs/storybook/dist/cli.js
- /Users/lihbr/Desktop/test-storybook/node_modules/@nuxtjs/storybook/bin/nuxt-storybook.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/lihbr/Desktop/test-storybook/node_modules/@nuxtjs/storybook/dist/index.js:19:35)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19) {
code: โMODULE_NOT_FOUNDโ,
requireStack: [
โ/Users/lihbr/Desktop/test-storybook/node_modules/@nuxtjs/storybook/dist/index.jsโ,
โ/Users/lihbr/Desktop/test-storybook/node_modules/@nuxtjs/storybook/dist/cli.jsโ,
โ/Users/lihbr/Desktop/test-storybook/node_modules/@nuxtjs/storybook/bin/nuxt-storybook.jsโ
]
}
FATAL Failed to run command nuxt-storybook: 21:33:52
Error: Command failed with exit code 1: nuxt-storybook
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ :heavy_multiplication_x: Nuxt Fatal Error โ
โ โ
โ Failed to run command `nuxt-storybook`: โ
โ Error: Command failed with exit code 1: nuxt-storybook โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
For anyone experiencing the same issue, in the meantime you should be able to fix it this way:
@storybook/[email protected] (and pin other addons to the same version) in your package.json[email protected] to dev dependencies.I tested on Windows and MacOS and ended up with the same output.
Since Storybook doesn't seem to commit to SemVer fully perhaps we should use the tilde range instead of the caret one for referencing its dependencies? This will prevent the module to break on its own every now and then?
cc @arnaudlewis
I confirm @lihbr workaround works.
Confirm

Have the same since yesterday ;((
This will fix in v3.4.
Thanks for the heads up @farnabaz, can we consider that one?
Since Storybook doesn't seem to commit to SemVer fully perhaps we should use the tilde range instead of the caret one for referencing its dependencies? This will prevent the module to break on its own every now and then?
I guess this has been fixed with version 4?
@farnabaz do you want to publish a patch for version 3 users that aren't yet on Nuxt 2.15.3+ or is it "good enough" to tell them to rely on the aforementioned workaround? Let me know, happy to help on a PR!
For anyone experiencing the same issue, in the meantime you should be able to fix it this way:
- Install explicitly
@storybook/[email protected](and pin other addons to the same version) in yourpackage.json- Install
[email protected]to dev dependencies.
It's good idea to release a patch for v3 users @lihbr
Contribution is more than welcome :slightly_smiling_face:
Cheers~ #260
Most helpful comment
Thanks for the heads up @farnabaz, can we consider that one?