I am working on an Electron Desktop app based on the electron-react-boilerplate. As expected, I'm locally starting up the application using npm start. However, at some point I occasionally started getting the following error while starting it up:
/Users/username/my-app/node_modules/webpack-sources/lib/ReplaceSource.js:166
content = content.match(SPLIT_LINES_REGEX) || [];
^
RangeError: Maximum call stack size exceeded
at String.match (<anonymous>)
at checkOriginalContent (/Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/ReplaceSource.js:166:23)
at /Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/ReplaceSource.js:358:9
at OriginalSource.streamChunks (/Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/OriginalSource.js:74:7)
at module.exports (/Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
at ReplaceSource.streamChunks (/Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/ReplaceSource.js:176:44)
at module.exports (/Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
at ConcatSource.streamChunks (/Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/ConcatSource.js:112:55)
at module.exports (/Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
at streamAndGetSourceAndMap (/Users/username/my-app</anonymous>/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js:27:53)
~/my-app main >1 *1 > (node:34510) electron: Failed to load URL: http://localhost:1212/index.html with error: ERR_EMPTY_RESPONSE
followed by repeated messages:
[34510:1210/154122.133709:ERROR:CONSOLE(1)] "Extension server error: Operation failed: Permission denied", source: devtools://devtools/bundled/models/extensions/extensions.js (1)
The problem seems to be webpack-related but the only change that I made in the existing configuration was some basic additions to be able to use tailwindcss (as instructed by the official docs). I further tried to narrow down the problem but the fact that this only happens sometimes, made it impossible to track down the actual source of the problem, so I am really not sure if this was caused by my implementation or is some kind of bug in the electron boilerplate.
Any pointers or ideas would be sanity-saving at this point.