-
Notifications
You must be signed in to change notification settings - Fork 427
Skip running npm install when yarn requirement is not met
#1539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BanzaiMan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a change that we need to make.
I understand that your repo is having a little bit of difficulty, but I think in your case the best strategy is to skip install phases for older versions of node. See ai/nanoid#96
lib/travis/build/script/node_js.rb
Outdated
| end | ||
| sh.else do | ||
| sh.cmd "yarn", retry: true, fold: 'install' | ||
| npm_install config[:npm_args] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| sh.if yarn_req_not_met do | ||
| sh.echo "Node.js version $(node --version) does not meet requirement for yarn." \ | ||
| " Please use Node.js #{YARN_REQUIRED_NODE_VERSION} or later.", ansi: :red | ||
| npm_install config[:npm_args] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@ai Since you merged my PR, I'll assume that this PR is no longer necessary. :-) |
Thanks for ai/nanoid#96. But I do not think it could help.
My project’s tests are passed because I replace |
|
PR was fixed (hope you will squash all commits) |
Fix for custom install, yarn and old Node
npm install when yarn requirement is not met
I have a case of:
Unfortunately, right now this case will not work with Travis since if Yarn doesn’t meet the requirement, Travis CI ignore custom
installscript and runnpm install.This PR should fix it and make this logic more predictable.