使用AWS部署Node时遇到问题

时间:2018-10-15 15:35:16

标签: node.js reactjs amazon-web-services react-native devops

我正在尝试将Node.js后端上传到弹性beantalk(AWS)。每次尝试上传和部署文件时,仪表板上都会出现以下错误:

errorlog1

在日志中,它告诉我找不到我的server.js文件:

Error: Cannot find module '/var/app/current/server.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
module.js:549
    throw err;
    ^

这是我的package.json:

{
  "name": "bridal-book-db",
  "version": "1.0.0",
  "description": "",
  "main": "knexfile.js",
  "dependencies": {
    "body-parser": "^1.18.3",
    "express": "^4.16.4",
    "knex": "^0.15.2",
    "pg": "^7.5.0"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node server.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Hat-Factory/bridal-book-db.git"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/Hat-Factory/bridal-book-db/issues"
  },
  "homepage": "https://github.com/Hat-Factory/bridal-book-db#readme"
}

我真的不确定发生了什么。我一直在尝试更改NPM软件包,并确保正确设置了我的脚本,但是无论我怎么做,错误仍然存​​在。 我还能在这里提供什么?预先感谢。

0 个答案:

没有答案
相关问题