create-react-app 安装后,还需要装express 吗?

create-react-app 安装后,我想用Express , 我看到node_modulues下已经有了express , 但是我引入报错

二种引法都不对

import logo from './logo.svg';import './App.css';import $ from 'jquery';
//import Express from 'express'      出错

//const Express = require('express');   出错
TypeError: http.ServerResponse is undefined
./node_modules/express/lib/response.js/<E:/react08/react-app/node_modules/express/lib/response.js:42

  39 |  * @public  40 |  */
  41 | 
> 42 | var res = Object.create(http.ServerResponse.prototype)
  43 | 
  44 | /**  45 |  * Module exports.

不解,请教 !


慕虎7371278
浏览 1117回答 2
2回答

天涯尽头无女友

express是服务器端的啊 你不可以在前端里面引用啊 引用地方错了吧
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

React.JS