gpt4 book ai didi

javascript - 努力运行 Storybook

转载 作者:行者123 更新时间:2023-12-05 06:10:02 26 4
gpt4 key购买 nike

您好,我是 React 的初学者,我正在试用 Storybook,当我尝试运行 Storybook 时出现以下错误。 **我尝试使用 npm update 进行更新,我认为与我的依赖项有冲突 **

ERROR in ./.storybook/generated-refs.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: You gave us a visitor for the node type StaticBlock but it's not a valid type
at verify (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\@babel\traverse\lib\visitors.js:112:13)
at explode (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\@babel\traverse\lib\visitors.js:34:3)
at Object.merge (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\@babel\traverse\lib\visitors.js:147:5)
at Object.<anonymous> (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\@babel\helper-replace-supers\lib\index.js:60:44)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\msngw\OneDrive\Desktop\SBook\myapp\node_modules\@babel\helper-create-class-features-plugin\lib\fields.js:13:52)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:903:19)
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/client/manager/index.js ./node_modules/@storybook/addon-links/dist/register.js ./node_modules/@storybook/addon-actions/dist/register.js ./node_modules/@storybook/addon-docs/dist/register.js ./node_modules/@storybook/addon-controls/dist/register.js ./node_modules/@storybook/addon-backgrounds/dist/register.js ./node_modules/@storybook/addon-viewport/dist/register.js ./node_modules/@storybook/addon-toolbars/dist/register.js ./.storybook/generated-refs.js main[9]

最佳答案

此错误已在 Storybook repo 中提出.正如那里提到的,删除 yarn.lock 和 node_modules,然后使用 yarn 重新安装,解决了所有问题。

关于javascript - 努力运行 Storybook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64578983/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com