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
As part of the new esbuild-based build pipeline, Angular added more control about output paths and the outputPath can now be an object instead of just a plain string. For example, in angular.json you can now set
However, when using that in angular.json, storybook fails to start with
=> Failed to build the preview
TypeError [ERR_INVALID_ARG_TYPE]: The "paths[1]" argument must be of type string. Received an instance of Object
at __node_internal_captureLargerStackTrace2 (https://rlmipnnmvgithub-lgjm.w-credentialless-staticblitz.com/builtins.5bf3667c.js:101:5335)
at new NodeError (https://rlmipnnmvgithub-lgjm.w-credentialless-staticblitz.com/builtins.5bf3667c.js:101:4149)
at validateString (https://rlmipnnmvgithub-lgjm.w-credentialless-staticblitz.com/builtins.5bf3667c.js:265:1272)
at Object.resolve (https://rlmipnnmvgithub-lgjm.w-credentialless-staticblitz.com/builtins.5bf3667c.js:287:7403)
at getCommonConfig (./node_modules/@angular-devkit/build-angular/src/tools/webpack/configs/common.js:275:24)
at async Promise.all (index 0)
at async generateWebpackConfig (./node_modules/@angular-devkit/build-angular/src/utils/webpack-browser-config.js:60:22)
at async generateBrowserWebpackConfigFromContext (./node_modules/@angular-devkit/build-angular/src/utils/webpack-browser-config.js:117:20)
at async generateI18nBrowserWebpackConfigFromContext (./node_modules/@angular-devkit/build-angular/src/utils/webpack-browser-config.js:67:20)
at async exports.getWebpackConfig (./node_modules/@storybook/angular/dist/server/angular-cli-webpack.js:42:35)
at async Object.webpack (./node_modules/@storybook/builder-webpack5/dist/presets/custom-webpack-preset.js:1:3173)
at async starter (./node_modules/@storybook/builder-webpack5/dist/index.js:1:6267)
at async Module.start (./node_modules/@storybook/builder-webpack5/dist/index.js:1:10138)
at async storybookDevServer (./node_modules/@storybook/core-server/dist/index.js:40:7719)
at async buildOrThrow (./node_modules/@storybook/core-server/dist/index.js:36:1975)
at async buildDevStandalone (./node_modules/@storybook/core-server/dist/index.js:78:1323)
at async withTelemetry (./node_modules/@storybook/core-server/dist/index.js:40:3599)
Describe the bug
As part of the new esbuild-based build pipeline, Angular added more control about output paths and the
outputPath
can now be an object instead of just a plain string. For example, in angular.json you can now setHowever, when using that in angular.json, storybook fails to start with
Reproduction link
https://stackblitz.com/edit/github-uzgadq-yz5lzq?file=angular.json
Reproduction steps
Alternatively, open any angular+storybook project and switch the outputPath into object syntax. Result is that storybook fails to start.
System
Additional context
No response
The text was updated successfully, but these errors were encountered: