由于 NPM 警告,AWS Elastic Beanstalk 部署失败
Posted
技术标签:
【中文标题】由于 NPM 警告,AWS Elastic Beanstalk 部署失败【英文标题】:AWS Elastic Beanstalk fails deployment because of NPM warnings 【发布时间】:2021-06-21 06:17:39 【问题描述】:我的弹性 beanstalk 部署失败并显示此日志
2021/03/23 14:42:05.458565 [ERROR] An error occurred during execution of command [config-deploy] - [Use NPM to install dependencies]. Stop running the command. Error: Command /bin/sh -c npm --production install failed with error exit status 1. Stderr:npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797 )
npm WARN deprecated is-hex@1.1.3: Development of this module has been stopped.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated request@2.16.6: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797 )
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hawk@0.10.2: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated hoek@0.7.6: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated cryptiles@0.1.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@0.3.8: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp@0.1.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated json3@3.2.6: Please use the native JSON object instead of JSON 3
npm WARN deprecated node-uuid@1.4.1: Use uuid module instead
这不应导致平台部署失败。
有没有办法覆盖ELB npm install
命令添加--logLevel=error
标志。
即使可以以某种方式忽略警告,仍然感觉像是 ELB 的错误。
【问题讨论】:
您能否分享有关如何设置 Beanstalk 应用程序代码的更多详细信息? 【参考方案1】:最终通过添加.npmrc
文件并添加--logLevel=error
行来解决问题
【讨论】:
以上是关于由于 NPM 警告,AWS Elastic Beanstalk 部署失败的主要内容,如果未能解决你的问题,请参考以下文章
AWS Elastic Beanstalk Node.js npm 安装错误
AWS Elastic Beanstalk - 如何使用 npm 和 webpack 构建捆绑 JS
AWS Elastic Beanstalk |错误:无法运行 npm 安装。快照日志以获取更多详细信息
在 aws elastic beanstalk 中启动节点 pm2 进程管理器的问题,npm 更新检查失败