无法在Elastic Beanstalk上部署KeystoneJS

时间:2016-05-19 15:03:39

标签: node.js amazon-web-services elastic-beanstalk keystonejs

我有一个KeystoneJS应用程序,我正在尝试在t2.micro实例上的Elastic Beanstalk上部署。在部署过程中,部署错误,并在eb-activity.log中输出以下内容:

{
    "status":200,
    "status_message":"Direct ways found",
    "data":[{"codice_linea":"5","partenza":"Longa","ora_partenza":"17:34:00","arrivo":"Schiavon","ora_arrivo":"17:38:00"}]
}  

我还检查了npm-debug.log并看到以下内容:

> kerberos@0.0.11 install /tmp/deployment/application/node_modules/keystone/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)


Running npm install: /opt/elasticbeanstalk/node-install/node-v4.4.3-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.
Traceback (most recent call last):
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 681, in 
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 663, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 131, 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 166, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v4.4.3-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status -9.

如果我将实例大小增加到t2.small,也会发生这种情况。这些实例是否不足以安装KeystoneJS?

1 个答案:

答案 0 :(得分:0)

这可能是你的gitignore / npmignore的一个问题。我会尝试在项目根目录中放置一个黑色.npmignore。

如果项目中没有.npmignore,则npm默认使用.gitignore

https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package

StackOverflow参考:npm install errors with Error: ENOENT, chmod

相关问题