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

[Bug]: Neither '@/mixins/window.vue' nor '@/mixins/window.js(x)' or '@/mixins/window/index.js(x)' or '@/mixins/window/index.ts(x)' could be found in '/Users/something/Desktop/something/repos/vue3-playground/packages/storybook/src/components/Modules/MainNav' #21691

Open
RodrigoProjects opened this issue Mar 20, 2023 · 5 comments

Comments

@RodrigoProjects
Copy link

Describe the bug

When I try to import a js file that exists inside the src/ folder it seems to not be bundled or available to storybook in the client.

To Reproduce

image
Create a file structure like this in storybook 7 and put js files inside it.

Type to import them in a vue component with the following alias: "@/mixins/file.js".

You get the following error:
image
image

System

Environment Info:

  System:
    OS: macOS 13.2.1
    CPU: (12) x64 Apple M2 Pro
  Binaries:
    Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
  Browsers:
    Chrome: 111.0.5563.64
    Safari: 16.3
  npmPackages:
    @storybook/addon-actions: ^7.0.0-beta.47 => 7.0.0-rc.5
    @storybook/addon-essentials: ^7.0.0-beta.47 => 7.0.0-rc.5
    @storybook/addon-interactions: ^7.0.0-beta.47 => 7.0.0-rc.5
    @storybook/addon-links: ^7.0.0-beta.47 => 7.0.0-rc.5
    @storybook/testing-library: ^0.0.14-next.1 => 0.0.14-next.1
    @storybook/vue3: ^7.0.0-beta.47 => 7.0.0-rc.5
    @storybook/vue3-vite: ^7.0.0-beta.47 => 7.0.0-rc.5

Additional context

No response

@lana-k
Copy link

lana-k commented Mar 22, 2023

Have the same warning in "@storybook/vue": "^6.5.16" and vite. The warning is only for mixins, other imports using aliases work without any warnings. And what is more strange is that mixins actually work, but storybook still shows that warnings for some reason.

@braddialpad
Copy link

Also getting this with storybook 7.0 / vite

@lopis
Copy link

lopis commented May 11, 2023

Also having this issue. Old discussions and solutions related to vueDocsGen don't seem to help, but it might still be related.

Edit: actually, my bad, I had a small typo. The old tips still work. Pass your alias to vueDocgenOptions:

    {
      name: '@storybook/addon-docs',
      options: {
        // This is needed to avoid some warnings
        // https://github.com/storybookjs/storybook/issues/9615
        vueDocgenOptions: {
          alias: {
            '~~': rootPath
          },
        },
      },
    },

@braddialpad
Copy link

Edit: actually, my bad, I had a small typo. The old tips still work. Pass your alias to vueDocgenOptions:

Hmm this seemed promising, unfortunately didn't work for me.

@YajanaRao
Copy link

Also having this issue. Old discussions and solutions related to vueDocsGen don't seem to help, but it might still be related.

Edit: actually, my bad, I had a small typo. The old tips still work. Pass your alias to vueDocgenOptions:

    {
      name: '@storybook/addon-docs',
      options: {
        // This is needed to avoid some warnings
        // https://github.com/storybookjs/storybook/issues/9615
        vueDocgenOptions: {
          alias: {
            '~~': rootPath
          },
        },
      },
    },

This is for Vite storybook @lopis ? I do have the same issue with storybook 7.6.17 and vite 4.1.4

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

Successfully merging a pull request may close this issue.

7 participants