I am suddenly unable to build my Webpack frontend, I randomly began getting this error despite not making any changes to the code:
Starting the development server...
/home/username/Documents/frontend/node_modules/react-dev-utils/ModuleScopePlugin.js:32
request.descriptionFileRoot.indexOf('/node_modules/') !== -1 ||
^
TypeError: Cannot read properties of undefined (reading 'indexOf')
at /home/username/Documents/frontend/node_modules/react-dev-utils/ModuleScopePlugin.js:32:39
at Hook.eval [as callAsync] (eval at create (/home/username/Documents/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:52:1)
at Resolver.doResolve (/home/username/Documents/frontend/node_modules/enhanced-resolve/lib/Resolver.js:715:16)
at /home/username/Documents/frontend/node_modules/enhanced-resolve/lib/TryNextPlugin.js:32:14
at _next0 (eval at create (/home/username/Documents/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:173:1)
at eval (eval at create (/home/username/Documents/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:195:1)
at /home/username/Documents/frontend/node_modules/enhanced-resolve/lib/ConditionalPlugin.js:40:47
at Hook.eval [as callAsync] (eval at create (/home/username/Documents/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:187:1)
at Resolver.doResolve (/home/username/Documents/frontend/node_modules/enhanced-resolve/lib/Resolver.js:715:16)
at /home/username/Documents/frontend/node_modules/enhanced-resolve/lib/ConditionalPlugin.js:42:14
at Hook.eval [as callAsync] (eval at create (/home/username/Documents/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
at Resolver.doResolve (/home/username/Documents/frontend/node_modules/enhanced-resolve/lib/Resolver.js:715:16)
at /home/username/Documents/frontend/node_modules/enhanced-resolve/lib/NextPlugin.js:30:14
at _next0 (eval at create (/home/username/Documents/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:8:1)
at eval (eval at create (/home/username/Documents/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
at /home/username/Documents/frontend/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:64:16
at /home/username/Documents/frontend/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:152:14
at /home/username/Documents/frontend/node_modules/enhanced-resolve/lib/forEachBail.js:39:13
at /home/username/Documents/frontend/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:76:16
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
Node.js v20.19.2
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^
RpcIpcMessagePortClosedError: Cannot send the message - the message port has been closed for the process 146051.
at /home/username/Documents/frontend/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:47:47
at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
code: undefined,
signal: undefined
}
Node.js v20.19.2
My app was ejected from create-react-app years ago, and I haven't had any issues until they just sprung up today.
I am still running the same "react-dev-utils": "^12.0.1" and "webpack": "^5.92.1" that I have been using, nothing has changed that I am aware of. Re-running npm install --legacy-peer-deps does not introduce any changes to package-lock.json. What could be the cause, and how can I fix this?