如果我不使用项目,为什么我的项目尝试与Redis连接?

时间:2019-09-30 14:27:37

标签: node.js nginx redis

我刚遇到一个奇怪的错误,我以前从未遇到过。

因此,我已经在ubuntu服务器上安装了nginx,以便将后端与域一起使用,而不是IP。

现在,当我尝试启动项目时,它会多次返回此错误。

{ Error: connect ECONNREFUSED 127.0.0.1:6379
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 6379 }

在Google上进行一些搜索后,我发现我没有使用Redis服务器。谁能向我解释我该如何解决?

这也是我的package.json,以防万一

{
  "name": "server_dev",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "start": "NODE_ENV=production pm2-runtime index.js",
    "deploy": "pm2 startOrReload ecosystem.config.js --update-env",
    "dev": "cross-env NODE_ENV=development nodemon --exec babel-node --max-old-space-size=4096 src/index.js"
  },
  "dependencies": {
    "apollo-server-express": "^2.5.0",
    "aws-sdk": "^2.456.0",
    "axios": "^0.18.0",
    "bcrypt-nodejs": "^0.0.3",
    "cross-env": "^5.2.0",
    "esm": "^3.2.23",
    "expo-server-sdk": "^3.3.0",
    "express": "^4.16.4",
    "express-handlebars": "^3.1.0",
    "fs": "^0.0.1-security",
    "fs-extra": "^8.0.1",
    "graphql": "^14.3.0",
    "graphql-date": "^1.0.3",
    "graphql-kafka-subscriptions": "^0.2.5",
    "graphql-redis-subscriptions": "^2.1.0",
    "graphql-subscriptions": "^1.1.0",
    "graphql-tools": "^4.0.4",
    "html-pdf": "^2.2.0",
    "http": "^0.0.0",
    "https": "^1.0.0",
    "intl": "^1.2.5",
    "jsonwebtoken": "^8.5.1",
    "mangopay2-nodejs-sdk": "^1.10.0",
    "mongoose": "^5.5.8",
    "nexmo": "^2.4.1",
    "nodemailer": "5.1.1",
    "nodemailer-express-handlebars": "^3.0.0",
    "nodemailer-smtp-transport": "^2.7.4",
    "path": "^0.12.7",
    "puppeteer": "^1.16.0",
    "request": "^2.88.0",
    "request-promise": "^4.2.4",
    "subscriptions-transport-ws": "^0.9.16",
    "xmlhttprequest": "^1.8.0"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-preset-env": "^1.7.0",
    "eslint": "^5.16.0",
    "nodemon": "^1.19.0"
  }
}

0 个答案:

没有答案