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

Custom storybook configuration not resolving the correct path #270

Open
KeremTurkyilmaz opened this issue May 5, 2022 · 0 comments
Open

Comments

@KeremTurkyilmaz
Copy link

Hi,

I'm trying to use the module and integrate the storybook generated page with all the icons, but I get this error:

Error

ERROR in ./generated-stories-entry.js
Module not found: Error: Can't resolve './.storybook/@nuxtjs/svg-sprite/stories' in '/Users/user/Documents/repo/repo/repo-argon'
 @ ./generated-stories-entry.js 5:159-271
 @ multi ./.nuxt-storybook/composition-api/register.js ./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js ./node_modules/@storybook/core-client/dist/esm/globals/globals.js (webpack)-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined ./storybook-init-framework-entry.js ./node_modules/@storybook/addon-docs/dist/esm/frameworks/common/config.js-generated-config-entry.js ./node_modules/@storybook/addon-docs/dist/esm/frameworks/vue/config.js-generated-config-entry.js ./node_modules/@storybook/vue/dist/esm/client/preview/config-generated-config-entry.js ./node_modules/@storybook/addon-actions/dist/esm/preset/addDecorator.js-generated-config-entry.js ./node_modules/@storybook/addon-actions/dist/esm/preset/addArgs.js-generated-config-entry.js ./node_modules/@storybook/addon-backgrounds/dist/esm/preset/addDecorator.js-generated-config-entry.js ./node_modules/@storybook/addon-backgrounds/dist/esm/preset/addParameter.js-generated-config-entry.js ./node_modules/@storybook/addon-measure/dist/esm/preset/addDecorator.js-generated-config-entry.js ./node_modules/@storybook/addon-outline/dist/esm/preset/addDecorator.js-generated-config-entry.js ./node_modules/@storybook/addon-a11y/dist/esm/a11yRunner.js-generated-config-entry.js ./node_modules/@storybook/addon-a11y/dist/esm/a11yHighlight.js-generated-config-entry.js ./.storybook/preview.js-generated-config-entry.js ./generated-stories-entry.js
Child HtmlWebpackCompiler:
                          Asset      Size               Chunks  Chunk Names
    __child-HtmlWebpackPlugin_0  6.28 KiB  HtmlWebpackPlugin_0  HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    [./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/core-common/dist/cjs/templates/index.ejs] 2.03 KiB {HtmlWebpackPlugin_0} [built]
ModuleNotFoundError: Module not found: Error: Can't resolve './.storybook/@nuxtjs/svg-sprite/stories' in '/Users/user/Documents/repo/repo/repo-argon'
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/webpack/lib/Compilation.js:925:10
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/webpack/lib/ContextModuleFactory.js:143:23
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/neo-async/async.js:2830:7
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/neo-async/async.js:6877:13
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/webpack/lib/ContextModuleFactory.js:118:26
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/enhanced-resolve/lib/Resolver.js:213:14
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/user/Documents/repo/repo/repo-argon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/user/Documents/repo/repo/repo-argon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/user/Documents/repo/repo/repo-argon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
    at /Users/user/Documents/repo/repo/repo-argon/node_modules/enhanced-resolve/lib/Resolver.js:285:5
    at eval (eval at create (/Users/user/Documents/repo/repo/repo-argon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve './.storybook/@nuxtjs/svg-sprite/stories' in '/Users/user/Documents/repo/repo/repo-argon'
  using description file: /Users/user/Documents/repo/repo/repo-argon/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /Users/user/Documents/repo/repo/repo-argon/package.json (relative path: ./.storybook/@nuxtjs/svg-sprite/stories)
      as directory
        /Users/user/Documents/repo/repo/repo-argon/.storybook/@nuxtjs/svg-sprite/stories doesn't exist

Storybook main.js located into .storybook/main.js based on Configure Storybook Guide

const { nuxifyStorybook } = require('../.nuxt-storybook/storybook/main.js')

module.exports = nuxifyStorybook({
  webpackFinal(config, options) {
    config.node = {
      fs: 'empty'
    }
    return config
  },
  stories: ['../components/**/*.stories.mdx', '../components/**/*.stories.js'],
  addons: [
    'storybook-addon-designs',
    '@etchteam/storybook-addon-status',
    '@storybook/addon-a11y'
  ],
  parameters: {}
})
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

1 participant