在AWS Elastic Beanstack上部署Node.J应用程序时出错

时间:2018-10-13 01:49:59

标签: java node.js amazon-web-services

我正在尝试在AWS Elastic Beanstack上安装Node.JS应用程序。我收到以下错误。我该如何解决呢?

关于, 帕塔

我的应用程序使用JDBC。我的机器安装了Java 0.9.1。但是,JDBC无法安装。因此,我在机器上安装了Java-1.8,并将JAVA_HOME设置为Java-1.8。在我的本地计算机上,当我给出java -version时。我得到以下输出。

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

我不确定该错误是否是由于在AWS上部署时使用了错误的Java版本引起的。

Application deployment failed at 2018-10-13T01:36:50Z with exit status 1 and error: Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh failed.

+ /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install

> java@0.9.1 install /tmp/deployment/application/node_modules/java
> node-gyp rebuild

[node-java] Error: not found: javac
gyp: Call to 'node findJavaHome.js' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/opt/elasticbeanstalk/node-install/node-v8.11.4-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.67-66.56.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v8.11.4-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v8.11.4-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/deployment/application/node_modules/java
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java@0.9.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the java@0.9.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

0 个答案:

没有答案