[1] @storybook/addon-storyshots: Error: EMFILE: too many open files, watch 'src'
[1] @storybook/addon-storyshots: at FSWatcher.start (internal/fs/watchers.js:169:26)
[1] @storybook/addon-storyshots: at Object.watch (fs.js:1422:11)
[1] @storybook/addon-storyshots: at createFsWatchInstance (/home/fanis/projects/contributions/storybook/node_modules/@babel/cli/node_modules/chokidar/lib/nodefs-handler.js:38:15)
[1] @storybook/addon-storyshots: at setFsWatchListener (/home/fanis/projects/contributions/storybook/node_modules/@babel/cli/node_modules/chokidar/lib/nodefs-handler.js:81:15)
[1] @storybook/addon-storyshots: at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/fanis/projects/contributions/storybook/node_modules/@babel/cli/node_modules/chokidar/lib/nodefs-handler.js:233:14)
[1] @storybook/addon-storyshots: at FSWatcher.NodeFsHandler._handleDir (/home/fanis/projects/contributions/storybook/node_modules/@babel/cli/node_modules/chokidar/lib/nodefs-handler.js:429:19)
[1] @storybook/addon-storyshots: at FSWatcher.<anonymous> (/home/fanis/projects/contributions/storybook/node_modules/@babel/cli/node_modules/chokidar/lib/nodefs-handler.js:477:19)
[1] @storybook/addon-storyshots: at FSWatcher.<anonymous> (/home/fanis/projects/contributions/storybook/node_modules/@babel/cli/node_modules/chokidar/lib/nodefs-handler.js:482:16)
[1] @storybook/addon-storyshots: at FSReqCallback.oncomplete (fs.js:169:5) {
[1] @storybook/addon-storyshots: errno: -24,
[1] @storybook/addon-storyshots: syscall: 'watch',
[1] @storybook/addon-storyshots: code: 'EMFILE',
[1] @storybook/addon-storyshots: path: 'src',
[1] @storybook/addon-storyshots: filename: 'src'
[1] @storybook/addon-storyshots: }
[1] @storybook/addon-storyshots-puppeteer: Failed to compile js
[1] lerna ERR! cross-env-shell node $LERNA_ROOT_PATH/scripts/utils/watch-babel.js exited 1 in '@storybook/addon-storyshots-puppeteer'
[1] lerna ERR! cross-env-shell node $LERNA_ROOT_PATH/scripts/utils/watch-babel.js stdout:
[1] Successfully compiled 0 files with Babel (153ms).
系统环境信息:
System:
OS: Linux 4.15 Ubuntu 18.04.5 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Binaries:
Node: 12.18.3 - ~/nodeenvs/12.18.3/bin/node
Yarn: 1.22.5 - ~/.yarn/bin/yarn
npm: 6.14.6 - ~/nodeenvs/12.18.3/bin/npm
Browsers:
Chrome: 85.0.4183.121
Firefox: 81.0
npmPackages:
@storybook/eslint-config-storybook: ^2.4.0 => 2.4.0
@storybook/linter-config: ^2.5.0 => 2.5.0
@storybook/semver: ^7.3.2 => 7.3.2
发布于 2020-10-10 12:47
共1个回答
XL
游客xlRpUN
如果yarn dev
无效或者出现错误,可能需要重新编译指定的包(building specific packages):
如果您正在处理一个或几个包,对于您所做的每一次更改,您都必须重新构建这些包。为了简化这个过程,有一个CLI命令:
- 运行
yarn build
会显示需要选择的包列表。这个也可以运行在watch模式。 - 运行
yarn build <package-name>
构建指定的包。可以使用简化的包名,如@storybook/addon-docs
,可以使用yarn build addon-docs
命令。 - 运行
yarn build --all
构建所有包 - 添加
--watch
选项可以自动的运行在watch
模式,不管你是选择一个包构建,还是构建所有包。如yarn build core addon-docs --watch
或yarn build --all --watch
回答问题