Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs Storybook在保存后不刷新_Reactjs_Typescript_Storybook - Fatal编程技术网

Reactjs Storybook在保存后不刷新

Reactjs Storybook在保存后不刷新,reactjs,typescript,storybook,Reactjs,Typescript,Storybook,我创建了一本故事书,当我更改并保存某个内容后,浏览器不会自动刷新。所以每次我都要按F5键。不幸的是,我无法解决这个问题 我以以下内容开始故事书: yarn storybook 存储库位于上 更新 我发现在Firefox上热重新加载就像一种魅力。然而,在铬上热重新加载根本不起作用。我使用的是as操作系统,Chromium与flatpak一起安装 当我启动故事书时,终端会显示: $ start-storybook -p 6006 info @storybook/react v6.2.7 info

我创建了一本故事书,当我更改并保存某个内容后,浏览器不会自动刷新。所以每次我都要按F5键。不幸的是,我无法解决这个问题

我以以下内容开始故事书:

yarn storybook
存储库位于上

更新

我发现在Firefox上热重新加载就像一种魅力。然而,在铬上热重新加载根本不起作用。我使用的是as操作系统,Chromium与flatpak一起安装

当我启动故事书时,终端会显示:

$ start-storybook -p 6006
info @storybook/react v6.2.7
info 
info => Loading presets
info => Loading 1 config file in "/home/developer/projects/openidea/webapp/components/.storybook"
info => Loading 7 other files in "/home/developer/projects/openidea/webapp/components/.storybook"
info => Adding stories defined in "/home/developer/projects/openidea/webapp/components/.storybook/main.js"
WARN unable to find package.json for @rollup/plugin-node-resolve
WARN unable to find package.json for rollup
info => Using prebuilt manager
info => Using implicit CSS loaders
WARN unable to find package.json for @rollup/plugin-node-resolve
WARN unable to find package.json for rollup
info => Using React fast refresh
info => Using default Webpack4 setup
(node:145138) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.

See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
(Use `node --trace-deprecation ...` to show where the warning was created)
10% building 6/12 modules 6 active /home/developer/projects/openidea/webapp/components/node_modules/babel-loader/lib/index.js??ref--4-0!/home/developer/projects/openidea/webapp/components/.storybook/generated-stories-entry.jsinfo => Using cached manager
webpack built preview 6002361e38573b1c5351 in 9449ms
╭─────────────────────────────────────────────────────╮
│                                                     │
│   Storybook 6.2.7 started                           │
│   9.74 s for preview                                │
│                                                     │
│    Local:            http://localhost:6006/         │
│    On your network:  http://192.168.178.27:6006/    │
│                                                     │
╰─────────────────────────────────────────────────────╯
webpack building...
webpack built preview 533a9b622317ca763dd0 in 1930ms

在我的例子中,它是
-s src
我尝试了以下
的“故事书”:“开始故事书-p 6006-s./src”,
但它不起作用。它在铬上不起作用,但是在Firefox上工作起来很有魅力。当你用chromium启动storybook时,你是否在终端构建/启动或浏览器控制台运行时看到任何异常消息?我已经更新了我的帖子。