npm start 异常
zhongtingbing opened this issue · 2 comments
F:\node_boke\React-Express-Blog-Demo\node_modules\http-proxy\lib\http-proxy\index.js:119
throw err;
^
Error: connect ECONNREFUSED 127.0.0.1:3030
at Object.exports._errnoException (util.js:1024:11)
at exports._exceptionWithHostPort (util.js:1047:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1150:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react_express_blog@1.0.0 watch-client: cross-env NODE_ENV=development node ./server/index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react_express_blog@1.0.0 watch-client script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zhongtingbing\AppData\Roaming\npm-cache_logs\2017-12-01T01_16_44_581Z-debug.log
react_express_blog@1.0.0 start-dev-api F:\node_boke\React-Express-Blog-Demo
nodemon --watch server/api server/api/index.js
[nodemon] 1.12.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: F:\node_boke\React-Express-Blog-Demo\server\api/**/*
[nodemon] starting node server/api/index.js
(node:5424) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/connections.htm
l#use-mongo-client
数据库连接成功
===> api server is running at 127.0.0.1:3030
请问这怎么解决?
Windows电脑?确认端口没有被占用的画,把package.json中的启动命令分两个DOS窗口分别输入
还真是 ,要先启动后端,再启动前端。感谢