Unable to deploy to Elastic Beanstalk

1,383 views
Skip to first unread message

philip...@zoorepublic.com.au

unread,
Mar 22, 2016, 3:05:00 AM3/22/16
to Keystone JS
Im unable to deploy the keystone demo app to AWS Elastic Beanstalk. The problem appears to happen during npm install, specifically by some of the modules used by keystone. Ironically, when I run a docker container it works. Im sure it is due to something that is not in place ( eg gcc or something like it ) . Can someone offer any ebextensions, configurations, or ideas how to get this to work? I have attached the log here.

Version Node: 4.3.0
node command: npm install; npm start


 npm WARN deprecated grace...@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

  npm WARN deprecated npm...@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm

  npm WARN deprecated lod...@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.

  npm WARN deprecated grace...@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

  

  > spawn...@1.0.15 postinstall /tmp/deployment/application/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync

  > node postinstall

  

  npm WARN peerDependencies The peer dependency browserify@>= 2.3.0 < 14 included from browserify-shim will no

  npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 

  npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

  npm WARN optional dep failed, continuing fsev...@1.0.8

  

  > buffe...@2.1.3 install /tmp/deployment/application/node_modules/keystone/node_modules/keystone-utils/node_modules/slug/node_modules/unicode/node_modules/bufferstream/node_modules/buffertools

  > node-gyp rebuild

  

  Running npm install:  /opt/elasticbeanstalk/node-install/node-v4.3.0-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 <module>

      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.3.0-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)

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

  npm WARN deprecated grace...@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

  npm WARN deprecated npm...@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm

  npm WARN deprecated lod...@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.

  npm WARN deprecated grace...@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

  

  > spawn...@1.0.15 postinstall /tmp/deployment/application/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync

  > node postinstall

  

  npm WARN peerDependencies The peer dependency browserify@>= 2.3.0 < 14 included from browserify-shim will no

  npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 

  npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

  npm WARN optional dep failed, continuing fsev...@1.0.8

  

  > buffe...@2.1.3 install /tmp/deployment/application/node_modules/keystone/node_modules/keystone-utils/node_modules/slug/node_modules/unicode/node_modules/bufferstream/node_modules/buffertools

  > node-gyp rebuild


  Running npm install:  /opt/elasticbeanstalk/node-install/node-v4.3.0-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 <module>

      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.3.0-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1 (Executor::NonZeroExitStatus)


 


Eggy

unread,
Aug 24, 2016, 5:32:42 PM8/24/16
to Keystone JS
Did you find a solution to deploying keystone js? 

I believe it has to do with npm needing sudo permission. 

When I run npm on my local machine. Keystone won't install without sudo npm install.

I believe npm install is running with user permissions.
  

Damiano Viscardi

unread,
Aug 25, 2016, 4:07:12 AM8/25/16
to Keystone JS
I use version 0.3.13 and it deploy correctly. Also make sure you use at least a micro instance, small is even better.

Edgar Nunez

unread,
Aug 25, 2016, 9:15:08 PM8/25/16
to Keystone JS
I tried to deploy the latest keystone and got npm error. Do you remember if you need to add any custom .config file to make npm install correctly l or add dependencies like g++ to compile node-gyc.
Reply all
Reply to author
Forward
0 new messages