[Reactjs初学者]我做了什么:
- 一切都很好
- 已安装http代理中间件依赖项
- 现在,即使在删除后,我也会收到以下错误http代理中间件
- 按照另一个答案,我也尝试过:清理npm缓存,删除package-lock.json,重新安装节点模块(在服务器和客户端文件夹中,因为我不确定(
错误:
require(...) is not a function
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
有什么帮助吗?:(
最近做了一些更改,请查看最新的文档。
现在导入的最佳方法是:
const { createProxyMiddleware } = require('http-proxy-middleware');