I have a project uses Express and react, Everything was working fine,
I didn't make any changes to the code suddenly it starts to give this error.
In the previous days, I have upgraded node from 10.15.0 to 12.x and added Axios.
I tested after those changes and it works. now it does not, what this mean??
TypeError: Cannot read property 'prototype' of undefined
(anonymous function)
C:/Desktop/ahmad/client/node_modules/express/lib/response.js:42
39 | * @public
40 | */
41 |
> 42 | var res = Object.create(http.ServerResponse.prototype)
43 |
44 | /**
45 | * Module exports.
*/
View compiled
./node_modules/express/lib/response.js
http://localhost:3000/static/js/bundle.js:28181:30
__webpack_require__
C:/.../ahmad/client/webpack/bootstrap 4501180ca3adc0d915c0:678
675 | };
676 |
677 | // Execute the module function
> 678 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
679 |
680 | // Flag the module as loaded
681 | module.l = true;
View compiled
fn
C:/.../ahmad/client/webpack/bootstrap 4501180ca3adc0d915c0:88
85 | console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
86 | hotCurrentParents = [];
87 | }
> 88 | return __webpack_require__(request);
89 | };
90 | var ObjectFactory = function ObjectFactory(name) {
91 | return {
View compiled
./node_modules/express/lib/express.js
C:/.../Desktop/ahmad/client/node_modules/express/lib/express.js:22
19 | var Route = require('./router/route');
20 | var Router = require('./router');
21 | var req = require('./request');
> 22 | var res = require('./response');
23 |
24 | /**
25 | * Expose `createApplication()`.
*/
View compiled
__webpack_require__
C:/.../Desktop/ahmad/client/webpack/bootstrap 4501180ca3adc0d915c0:678
675 | };
676 |
677 | // Execute the module function
> 678 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
679 |
680 | // Flag the module as loaded
681 | module.l = true;
View compiled
fn
C:/.../Desktop/ahmad/client/webpack/bootstrap 4501180ca3adc0d915c0:88
85 | console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
86 | hotCurrentParents = [];
87 | }
> 88 | return __webpack_require__(request);
89 | };
90 | var ObjectFactory = function ObjectFactory(name) {
91 | return {
View compiled
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…