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

Unable to make it work #5

Closed
Archetipo95 opened this issue Jul 29, 2023 · 7 comments
Closed

Unable to make it work #5

Archetipo95 opened this issue Jul 29, 2023 · 7 comments

Comments

@Archetipo95
Copy link
Member

Archetipo95 commented Jul 29, 2023

Hi! I'm having troubles testing this project. The minimal reproduction is to init a new Nuxt project with the command npx nuxi@latest init PROJECT_NAME and then inside the root of the project I tried the command suggested in the README npx storybook@latest init
But it's not working, it runs, it asks me for the builder used in the project (I selected vite) and then it tell me "Storybook was successfully installed in your project! 🎉" but that's not true! My package.json is untouched and ofc the command yarn storybook fails.

I tried with node v16 and v18. Currently Im using yarn

@LucaMargadant
Copy link
Collaborator

I got it running in a nuxt project which uses yarn and Node 18.

To me your issue sounds more related to install the storybook itself than this package.

You need to use storybook for vue. I followed back then this guide here https://storybook.js.org/docs/vue/get-started/install.

To be honest i had to manually add the storybook command into my package.json like that:

"storybook": "yarn sb dev -p 6006",

After that i installed the @storybook-vue/nuxt package with yarn add -D @storybook-vue/nuxt and added it to the framework in main.ts of storybook:

framework: { name: "@storybook-vue/nuxt", options: {}, },

If it's still not working, there is also a working Demo Repo you can clone and try out on your machine. Maybe it helps to spot out differences to your setup and figure out more informations why it's not running.

@Archetipo95
Copy link
Member Author

Archetipo95 commented Jul 30, 2023

So this is the correct command to run npx storybook@latest init --type vue3

Btw yarn is giving me a lot of problems, I recommend mend to use pnpm

@chakAs3
Copy link
Contributor

chakAs3 commented Jul 31, 2023

So this is the correct command to run npx storybook@latest init --type vue3

Btw yarn is giving me a lot of problems, I recommend mend to use pnpm

you are. total right. I really recommend pnpm as yarn is hell.

the storybook init command for nuxt. is ready but not yet. merged to main so you solution is quite good for now all what you have to do after is change your .storybook/main.js

@chakAs3
Copy link
Contributor

chakAs3 commented Jul 31, 2023

GENERAL RECOMMENDATION: if you start any new project that does not have any Yarn legacy, please use PNPM. it will change your life and avoid you Yarn depression

@DanHulton
Copy link

So, I'm stuck in the boat where I'm still using Yarn, because Yarn has the ability to install multiple versions of a package for different architectures - this means it can install both a copy for my local Mac arch and the docker image arch at once, which is really convenient - one yarn install means it works locally and in Docker. PNPM doesn't offer this yet, and from looking at the comment thread about it, may not ever.

What is the general issue that's preventing yarn from working here? Like, this is the first-ever package I've come across that doesn't work because you're using a different major, well-supported package manager, so I'm just really confused about what could be the problem.

@chakAs3
Copy link
Contributor

chakAs3 commented Sep 17, 2023

@DanHulton please start by opening more specific issue regarding yarn, cause this is closed and clearly too vague

@DanHulton
Copy link

@chakAs3 Ah, sorry, my bad on two counts:

  1. I meant to make the comment on this issue: Internal server error: Transform failed #39
  2. I didn't want to open an actual issue, as you've already expressed a lack of interest in fixing yarn bugs, I was just hoping that the OP of that issue remembered what the problem was, and that I could use that to look further into it. I figured if I was able to make it work, I could just open a PR, so you didn't actually have to spend any time working on a yarn issue. But I should have been explicit about that when I was commenting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants