Sharetribe Deployment on Elastic Beanstalk

Hi

I am trying to install customize sharetribe on elastic beanstalk.

The problem i am facing is when the the beanstalk reaches “bundle exec rake assets:precompile” it throws npm errors for missing check-node-version and ensure-node-version

  + su -s /bin/bash -c 'bundle exec rake assets:precompile' webapp
  cd client && npm run build:client

  > @ build:client /var/app/ondeck/client
  > npm run ensure-node-version && webpack --config webpack.client.config.js


  > @ ensure-node-version /var/app/ondeck/client
  > check-node-version --package

  sh: check-node-version: command not found

  npm ERR! Linux 4.14.88-72.76.amzn1.x86_64
  npm ERR! argv "/opt/elasticbeanstalk/support/node-install/node-v7.8.0-linux-x64/bin/node" "/usr/bin/npm" "run" "ensure-node-version"
  npm ERR! node v7.8.0
  npm ERR! npm  v4.2.0
  npm ERR! file sh
  npm ERR! code ELIFECYCLE
  npm ERR! errno ENOENT
  npm ERR! syscall spawn
  npm ERR! @ ensure-node-version: `check-node-version --package`
  npm ERR! spawn ENOENT
  npm ERR!
  npm ERR! Failed at the @ ensure-node-version script 'check-node-version --package'.
  npm ERR! Make sure you have the latest version of node.js and npm installed.
  npm ERR! If you do, this is most likely a problem with the  package,
  npm ERR! not with npm itself.
  npm ERR! Tell the author that this fails on your system:
  npm ERR!     check-node-version --package
  npm ERR! You can get information on how to open an issue for this project with:
  npm ERR!     npm bugs
  npm ERR! Or if that isn't available, you can get their info via:
  npm ERR!     npm owner ls
  npm ERR! There is likely additional logging output above.
  npm WARN Local package.json exists, but node_modules missing, did you mean to install?

node and NPM version is below

[ec2-user@ip-172-31-4-173 ~]$ node -v
v7.8.0
[ec2-user@ip-172-31-4-173 ~]$ npm -v
4.2.0

if i try to install ensure-node-version manually i get 404 not found.

  + npm install ensure-node-version
  npm ERR! Linux 4.14.88-72.76.amzn1.x86_64
  npm ERR! argv "/opt/elasticbeanstalk/support/node-install/node-v7.8.0-linux-x64/bin/node" "/usr/bin/npm" "install" "ensure-node-version"
  npm ERR! node v7.8.0
  npm ERR! npm  v4.2.0
  npm ERR! code E404

  npm ERR! 404 Not found : ensure-node-version
  npm ERR! 404
  npm ERR! 404  'ensure-node-version' is not in the npm registry.

Thanks