描述bug
在以下场景中:
- 使用基于Vite的框架
- Stories globs目标
.mdx
以某种方式(如默认值) @storybook/addon-docs
没有在主配置中配置,既没有明确地也没有@storybook/addon-essentials
。
Storybook启动"正常",但显示空白屏幕无内容,终端中没有错误。浏览器控制台有React错误。
重现步骤
https://stackblitz.com/edit/github-g8fqna?file=.storybook/main.js
系统信息
- 无响应*
其他上下文信息
基于Webpack的项目将无法启动:
ModuleParseError: Module parse failed: Unexpected token (11:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import StackAlt from './assets/stackalt.svg';
|
> <Meta title="Example/Introduction" />
|
| <style>
at handleParseError (/Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/webpack/lib/NormalModule.js:741:23)
at /Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/webpack/lib/NormalModule.js:843:9
at processResult (/Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/webpack/lib/NormalModule.js:597:14)
at /Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/webpack/lib/NormalModule.js:646:9
at /Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/loader-runner/lib/LoaderRunner.js:368:5
at iterateNormalLoaders (/Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/loader-runner/lib/LoaderRunner.js:213:12)
at /Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/loader-runner/lib/LoaderRunner.js:205:7
at /Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/webpack/lib/NormalModule.js:626:20
at Array.eval (eval at create (/Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/tapable/lib/HookCodeFactory.js:28:14), <anonymous>:12:1)
at runCallbacks (/Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:18:17)
at /Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:149:7
at /Users/jeppe/dev/temp/sb-no-addons-wp/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
2条答案
按热度按时间blpfk2vs1#
any solution?
ipakzgxi2#
@angeloreis ,我无法从这个信息中判断你的问题是否与此有关。我认为你最好的选择是在Discord上开设一个支持线程。