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

Is yarn berry supported? #82

Closed
bmulholland opened this issue Nov 5, 2023 · 3 comments
Closed

Is yarn berry supported? #82

bmulholland opened this issue Nov 5, 2023 · 3 comments

Comments

@bmulholland
Copy link

bmulholland commented Nov 5, 2023

The whole thing isn't running for me when upgrading my project to Nuxt 3. I tried to install this using the exact package versions in an example Stackblitz, https://stackblitz.com/edit/github-dxsw3r-tjesvx, but I'm getting:

=> Failed to build the preview
Error: Cannot find @storybook/vue3-vite,

It is installed though:

    "@nuxtjs/storybook": "7.0.0",
    "@storybook-vue/nuxt": "0.1.7",
    "@storybook/addon-essentials": "7.5.0-alpha.3",
    "@storybook/addon-interactions": "7.5.0-alpha.3",
    "@storybook/addon-links": "7.5.0-alpha.3",
    "@storybook/blocks": "7.5.0-alpha.3",
    "@storybook/builder-vite": "7.5.0-alpha.3",
    "@storybook/testing-library": "^0.2.0",
    "@storybook/vue3": "7.5.0-alpha.3",
    "@types/node": "^18.17.5",
    "nuxt": "^3.6.5",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "storybook": "7.5.0-alpha.3",
    "vue": "^3.3.4",
    "vue-router": "^4.2.5",
    "@storybook-vue/vue3-vite" :"7.5.0-alpha.3.0",
    "@vue/compiler-core": "3.3.4",
    "vite": "4.3.9",

It's in node_modules too.

I'd post a minimal repro, except stackblitz doesn't support modern yarn.

@bmulholland
Copy link
Author

bmulholland commented Nov 5, 2023

BTW, trying all this because I can't get any version using "latest" running either. This happens: #76

Now trying with the exact package.json from https://github.com/storybook-vue/storybook-nuxt-demo

I tried those and I still get the same error from before:

 ERROR  At least one <template> or <script> is required in a single file component.                       4:59:22 p.m.

 ERROR  Transform failed with 1 error:                                                                    4:59:23 p.m.
83:7: ERROR: Multiple exports with the same name "default"
...
 ERROR  Transform failed with 2 errors:                                                                   4:59:23 p.m.
app.vue:36:6: ERROR: The symbol "_hoisted_1" has already been declared
app.vue:69:7: ERROR: Multiple exports with the same name "default"

These are all valid files.

Considering I'm using the exact same files as that demo, I have to assume the problem is yarn. Again, I'd narrow it down more, but stackblitz won't work. If someone can post a repro system on a tool that supports modern package management, I'll try that out.

@peteromano
Copy link

Pnpm works fine

@chakAs3
Copy link
Contributor

chakAs3 commented Dec 11, 2023

i did not yet work on Yarn , Yarn berry issue. please use pnpm till i fix this issue.
use

{
    "private": true,
    "type": "module",
    "scripts": {
        "build": "nuxt build",
        "dev": "HOST=0.0.0.0 nuxt dev",
        "generate": "nuxt generate",
        "preview": "nuxt preview",
        "postinstall": "nuxt prepare",
        "storybook": "storybook dev --port 6006",
        "build-storybook": "storybook build"
    },
    "devDependencies": {
        "@nuxt/devtools": "0.8.4",
        "nuxt": "^3.8.1",
        "vue": "^3.3.8",
        "vue-router": "^4.2.5",
        "react": "^18.2.0",
        "react-dom": "^18.2.0",
        "storybook": "7.5.3",
        "tailwindcss": "^3.0.23",
        "@types/node": "^18.17.5",
        "@storybook/vue3": "7.5.3",
        "@storybook/vue3-vite": "7.5.3",
        "@storybook-vue/nuxt": "0.2.0",
        "@storybook/addon-links": "7.5.3",
        "@storybook/builder-vite": "7.5.3",
        "@storybook/addon-essentials": "7.5.3",
        "@storybook/addon-interactions": "7.5.3",
        "@storybook/testing-library": "^0.2.0",
        "@storybook/blocks": "7.5.3"
    },
    "pnpm": {
        "nuxt": "3.8.1"
    }
}

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

3 participants