我正在尝试通过使用node和npm的弹性beantalk在rails应用程序上安装ruby。
[ec2-user@ip-172-31-41-201 client]$ node -v
v7.8.0
[ec2-user@ip-172-31-41-201 client]$ npm -v
4.2.0
问题是我在"rake assets:precompile"
步骤遇到了错误
+ 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?
npm ERR! Please include the following file with any support request:
npm ERR! /home/webapp/.npm/_logs/2019-01-26T17_19_36_394Z-debug.log
但是我可以看到已经安装了chceck-node-version
[ec2-user@ip-172-31-41-201 client]$ npm view check-node-version version
3.2.0
有趣的是,我在执行以下命令时缺少脚本check-node-version
[ec2-user@ip-172-31-41-201 client]$ npm run check-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" "run" "check-node-version"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! missing script: check-node-version
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/ec2-user/.npm/_logs/2019-01-26T17_38_37_148Z-debug.log
关于我在做什么错的任何建议?