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

Nuxt storybook doesn't support object style path #353

Closed
Roy-Ermers opened this issue Jan 14, 2022 · 0 comments
Closed

Nuxt storybook doesn't support object style path #353

Roy-Ermers opened this issue Jan 14, 2022 · 0 comments
Labels
type: bug Something isn't working

Comments

@Roy-Ermers
Copy link

Version

@nuxtjs/storybook: 4.2.0
nuxt: 2.15.7

Steps to reproduce

Create an empty nuxt project with @nuxtjs/storybook installed.
set nuxt.config.js to this:

{
   ...
   storybook: {
      stories: [
          {
              directory: '~/stories',
              titlePrefix: 'Components',
              files: '*.stories.js',
          }
      ]
}

What is Expected?

Nuxtjs/storybook should work like the documentation on storybook says it should.

What is actually happening?

An error is printed in the console and the build stops.

ERR! TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
ERR!     at new NodeError (node:internal/errors:371:5)
ERR!     at validateString (node:internal/validators:119:11)
ERR!     at Object.isAbsolute (node:path:1157:5)
ERR!     at /home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/preview/entries.js:88:54
ERR!     at Array.map (<anonymous>)
ERR!     at createPreviewEntry (/home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/preview/entries.js:87:44)
ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5)
ERR!     at async Object.entries (/home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/presets/preview-preset.js:24:26)
ERR!     at async getConfig (/home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:54:17)
ERR!     at async Object.start (/home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:95:16)
ERR!     at async Promise.all (index 0)
ERR!     at async storybookDevServer (/home/roy/source/components/node_modules/@storybook/core-server/dist/cjs/dev-server.js:123:28)
ERR!     at async buildDevStandalone (/home/roy/source/components/node_modules/@storybook/core-server/dist/cjs/build-dev.js:112:31)
ERR!     at async buildDev (/home/roy/source/components/node_modules/@storybook/core-server/dist/cjs/build-dev.js:154:5)
ERR!  TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
ERR!     at new NodeError (node:internal/errors:371:5)
ERR!     at validateString (node:internal/validators:119:11)
ERR!     at Object.isAbsolute (node:path:1157:5)
ERR!     at /home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/preview/entries.js:88:54
ERR!     at Array.map (<anonymous>)
ERR!     at createPreviewEntry (/home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/preview/entries.js:87:44)
ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5)
ERR!     at async Object.entries (/home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/presets/preview-preset.js:24:26)
ERR!     at async getConfig (/home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:54:17)
ERR!     at async Object.start (/home/roy/source/components/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:95:16)
ERR!     at async Promise.all (index 0)
ERR!     at async storybookDevServer (/home/roy/source/components/node_modules/@storybook/core-server/dist/cjs/dev-server.js:123:28)
ERR!     at async buildDevStandalone (/home/roy/source/components/node_modules/@storybook/core-server/dist/cjs/build-dev.js:112:31)
ERR!     at async buildDev (/home/roy/source/components/node_modules/@storybook/core-server/dist/cjs/build-dev.js:154:5) {
ERR!   code: 'ERR_INVALID_ARG_TYPE'
ERR! }
@Roy-Ermers Roy-Ermers added the type: bug Something isn't working label Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant