[英]AWS Elastic Beanstalk not able to comprehend nodemon
我正在壓縮節點和 angular 文件並將其上傳到 AWS beanstack env (node.js) 中,但是部署失敗並顯示以下日志消息 -
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
非常感謝幫助,下面是我的 package.json 項目 Node.js -
{
"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"
}
}
你好,你需要安裝nodemon
npm install -g nodemon or sudo npm install -g nodemon
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.