You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, as soon as I set up my nx workspace with storybook, I am getting the following error:
=> Failed to build the preview
TypeError [ERR_INVALID_ARG_TYPE]: The "paths[1]" argument must be of type string. Received an instance of Array
at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at new NodeError (node:internal/errors:405:5)
at validateString (node:internal/validators:162:11)
at Object.resolve (node:path:1097:7)
at getCommonConfig (/Users/fgabriel/bankjoy/node_modules/@angular-devkit/build-angular/src/webpack/configs/common.js:82:43)
at async Promise.all (index 0)
at async generateWebpackConfig (./node_modules/@angular-devkit/build-angular/src/utils/webpack-browser-config.js:64:22)
at async generateBrowserWebpackConfigFromContext (./node_modules/@angular-devkit/build-angular/src/utils/webpack-browser-config.js:119:20)
at async generateI18nBrowserWebpackConfigFromContext (./node_modules/@angular-devkit/build-angular/src/utils/webpack-browser-config.js:70:20)
at async exports.getWebpackConfig (./node_modules/@storybook/angular/dist/server/angular-cli-webpack.js:40:35)
at async Object.webpack (./node_modules/@storybook/builder-webpack5/dist/presets/custom-webpack-preset.js:1:3280)
at async starter (./node_modules/@storybook/builder-webpack5/dist/index.js:1:22057)
at async Module.start (./node_modules/@storybook/builder-webpack5/dist/index.js:1:25862)
at async storybookDevServer (./node_modules/@storybook/core/dist/core-server/index.cjs:36000:11)
at async buildOrThrow (./node_modules/@storybook/core/dist/core-server/index.cjs:35017:12)
at async buildDevStandalone (./node_modules/@storybook/core/dist/core-server/index.cjs:37190:78)
at async withTelemetry (./node_modules/@storybook/core/dist/core-server/index.cjs:35757:12)
Environment:
Mac silicon
Node version 18.20.4 (same with 20.x)
Steps to reproduce:
npx create-nx-workspace nx-with-storybook-4 // standalone project, using webpack as bundler
cd nx-with-storybook-4/
npx nx add @nx/storybook // I can see it uses [email protected]
npx nx g @nx/angular:storybook-configuration // all options true
Finally:
npx nx storybook
to run the project
Any help will be much appreciated
Additional information
Story book version number: 20.2.0
import type { StorybookConfig } from '@storybook/angular';
const config: StorybookConfig = {
stories: ['../src/app/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions'],
framework: {
name: '@storybook/angular',
options: {},
},
};
export default config;
// To customize your webpack configuration you can use the webpackFinal field.
// Check https://storybook.js.org/docs/react/builders/webpack#extending-storybooks-webpack-config
// and https://nx.dev/recipes/storybook/custom-builder-configs
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Hi, as soon as I set up my nx workspace with storybook, I am getting the following error:
Environment:
Steps to reproduce:
Finally:
npx nx storybook
to run the project
Any help will be much appreciated
Additional information
Story book version number: 20.2.0
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions