[英]TypeError: Cannot read properties of undefined (reading 'prototype') React Typescript + Express
[英]TypeError: Cannot read properties of undefined (reading 'prototype') React APP
我在我的 React APP 中收到此错误:
TypeError: Cannot read properties of undefined (reading 'prototype')
(anonymous function)
C:/Users/tatup/Desktop/GrowApp/frontend/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
这就是我将 Express 导入到 server.js 文件的方式:
import express from 'express'
const app = express()
有什么线索吗?
像这样试试
import express from 'express'
const app = express()
const http = require('http');
const res = Object.create(http.ServerResponse.prototype)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.