简体   繁体   中英

AWS Elastic Beanstalk not able to comprehend nodemon

I am zipping the node and angular file and uploading it in AWS beanstack env (node.js), but getting deploy fail with following log message -

Jan 25 19:58:00 ip-172-31-0-214 web: npm ERR! A complete log of this run can be found in:
Jan 25 19:58:00 ip-172-31-0-214 web: npm ERR!     /home/webapp/.npm/_logs/2022-01-25T19_58_00_570Z-debug.log
Jan 25 19:58:01 ip-172-31-0-214 web: > pms@1.0.0 start /var/app/current
Jan 25 19:58:01 ip-172-31-0-214 web: > nodemon server.js
Jan 25 19:58:01 ip-172-31-0-214 web: sh: nodemon: command not found
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! code ELIFECYCLE
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! syscall spawn
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! file sh
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! errno ENOENT
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! pms@1.0.0 start: `nodemon server.js`
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! spawn ENOENT
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR!
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! Failed at the pms@1.0.0 start script.
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR! A complete log of this run can be found in:
Jan 25 19:58:01 ip-172-31-0-214 web: npm ERR!     /home/webapp/.npm/_logs/2022-01-25T19_58_01_067Z-debug.log
Jan 25 20:14:06 ip-172-31-0-214 web: > pms@1.0.0 start /var/app/current
Jan 25 20:14:06 ip-172-31-0-214 web: > nodemon server.js
Jan 25 20:14:06 ip-172-31-0-214 web: sh: nodemon: command not found
Jan 25 20:14:06 ip-172-31-0-214 web: npm ERR! code ELIFECYCLE
Jan 25 20:14:06 ip-172-31-0-214 web: npm ERR! syscall spawn
Jan 25 20:14:06 ip-172-31-0-214 web: npm ERR! file sh
Jan 25 20:14:06 ip-172-31-0-214 web: npm ERR! errno ENOENT
Jan 25 20:14:06 ip-172-31-0-214 web: npm ERR! pms@1.0.0 start: `nodemon server.js`
Jan 25 20:14:06 ip-172-31-0-214 web: npm ERR! spawn ENOENT

Help much appreciated, below is my package.json for Node.js project -

{
  "name": "pms",
  "version": "1.0.0",
  "description": "",
  "main": "server.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon server.js"
  },
  "author": "Sayak",
  "license": "****",
  "dependencies": {
    ...something here...
  },
  "devDependencies": {
    "nodemon": "^2.0.5"
  }
}

Hello you need to install nodemon

npm install -g nodemon or sudo npm install -g nodemon

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM