Skip to content

Commit 2c0ab35

Browse files
committed
fix: work around inotify resource starvation
In order to avoid running out of kernel inotify handles in development environments where it's not possible to raise the corresponding limit, stop watching `node_modules` when running `openedx dev`.
1 parent 3db3dbe commit 2c0ab35

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tools/webpack/webpack.config.dev.shell.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ const config: Configuration = {
117117
// reloading.
118118

119119
devServer: getDevServer(),
120+
121+
// Limit the number of watched files to avoid `inotify` resource starvation.
122+
watchOptions: {
123+
ignored: /node_modules/
124+
}
120125
};
121126

122127
export default config;

tools/webpack/webpack.config.dev.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ const config: Configuration = {
8585
// reloading.
8686

8787
devServer: getDevServer(),
88+
89+
// Limit the number of watched files to avoid `inotify` resource starvation.
90+
watchOptions: {
91+
ignored: /node_modules/
92+
}
8893
};
8994

9095
export default config;

0 commit comments

Comments
 (0)