AWS Elastic Beanstalk |错误:无法运行 npm 安装。快照日志以获取更多详细信息
Posted
技术标签:
【中文标题】AWS Elastic Beanstalk |错误:无法运行 npm 安装。快照日志以获取更多详细信息【英文标题】:AWS Elastic Beanstalk | Error:Failed to run npm install. Snapshot logs for more details 【发布时间】:2020-05-19 12:39:25 【问题描述】:我正在尝试部署一个 Reactjs/Firebase 应用程序(使用材料 UI 模板制作),但是当我通过上传代码创建新环境时,它显示以下错误:
日志文件中显示的错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.23.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.23.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/.npm/_logs/2020-02-03T17_23_00_028Z-debug.log
Running npm install: /opt/elasticbeanstalk/node-install/node-v10.15.1-linux-x64/bin/npm
Setting npm config jobs to 1
npm config jobs set to 1
Running npm with --production flag
Failed to run npm install. Snapshot logs for more details.
UTC 2020/02/03 17:23:00 cannot find application npm debug log at /tmp/deployment/application/npm-debug.log
Traceback (most recent call last):
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 695, in <module>
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, in run_npm_install
self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 180, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v10.15.1-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1 (Executor::NonZeroExitStatus)
我多次尝试重建环境,但都显示相同的错误。
错误的原因可能是什么?我可以尝试解决什么问题?
我使用的是节点版本 10.15.1
【问题讨论】:
【参考方案1】:cannot find application npm debug log
参考这个answer
【讨论】:
以上是关于AWS Elastic Beanstalk |错误:无法运行 npm 安装。快照日志以获取更多详细信息的主要内容,如果未能解决你的问题,请参考以下文章
AWS Elastic Beanstalk chown PythonPath 错误
AWS - Elastic BeansTalk:[错误] 'php' 未找到或无法统计
AWS CloudFormation + Elastic Beanstalk 错误
AWS Elastic Beanstalk - 错误 requirements.txt