nuxt-modules / storybook

Storybook integration with Nuxt.
https://storybook.nuxtjs.org
378 stars 82 forks source link

nuxt-storybook is not a Nuxt module #657

Open alban-kazandjian opened 5 days ago

alban-kazandjian commented 5 days ago

Steps to reproduce: Following steps from the documentation to install storybook on a fresh nuxt project.

$ npx nuxi@latest init test
$ cd test
$ npx nuxi@latest module add storybook

 WARN  It seems that nuxt-storybook is not a Nuxt module

❯ Do you want to continue installing `nuxt-storybook` anyway?
● Yes / ○ No

Once the job finishes the nuxt.config.ts file contains:

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: ["nuxt-storybook"]
})

and the package.json

{
  "name": "nuxt-app",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "dependencies": {
    "nuxt": "^3.12.2",
    "nuxt-storybook": "^0.0.0",
    "vue": "^3.4.29",
    "vue-router": "^4.3.3"
  }
}

Shouldn't the name of the module be @nuxtjs/storybook ?

soulrpg commented 4 days ago

Yup, module in nuxt.config should be: @nuxtjs/storybook Instead it pulls empty npm package from here: https://www.npmjs.com/package/nuxt-storybook

tobiasdiez commented 4 days ago

Should be fixed by https://github.com/nuxt/modules/pull/995.