Nrwl:Storybook 给我错误 TypeError [ERR_INVALID_ARG_TYPE]:“路径”参数必须是字符串类型。收到未定义
Posted
技术标签:
【中文标题】Nrwl:Storybook 给我错误 TypeError [ERR_INVALID_ARG_TYPE]:“路径”参数必须是字符串类型。收到未定义【英文标题】:Nrwl: Storybook giving me error TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined 【发布时间】:2021-12-12 07:12:00 【问题描述】:我的 Angular 故事书运行良好,但我添加了一个组件,尝试重新生成故事书并开始出现以下错误
info => Loading presets
info => Loading 1 config file in "C:\code\libs\lib-core\.storybook"
info => Loading 8 other files in "C:\code\libs\lib-core\.storybook"
info => Adding stories defined in "C:\code\libs\lib-core\.storybook\main.js"
info => Found custom tsconfig.json
info => Using implicit CSS loaders
info => Loading angular-cli config
info => Using angular project "lib-core:build" for configuring Storybook
ERR! => Could not get angular cli webpack config
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
Broken build, fix the error above.
You may need to refresh the browser.
———————————————————————————————————————————————
> NX
Failed tasks:
Hint: run the command with --verbose for more details.
【问题讨论】:
【参考方案1】:为了解决这个问题,我不得不在架构师 --> 构建 --> 选项下添加一个属性 tsConfig,并尝试重新运行故事书
【讨论】:
以上是关于Nrwl:Storybook 给我错误 TypeError [ERR_INVALID_ARG_TYPE]:“路径”参数必须是字符串类型。收到未定义的主要内容,如果未能解决你的问题,请参考以下文章
`No "exports" main resolve` 尝试运行 Storybook 时出现错误
Storybook Angular:如何使用导入的自定义库中的模型/接口?