-
Notifications
You must be signed in to change notification settings - Fork 2
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
CLI: Check node
and npm
version
#238
Comments
Definitely understand any confusion from the error and experience.
If possible, I would guide us against making
|
I completely agree. I'd also advocate making the tool agnostic to the node version manager. Another alternative we could follow is providing an argument to switch the node version. E.g |
Just locally right? All it should do before using npm is checkout the repo and switch branches. I just want to make sure it didn't push anything before failing. I suppose we could fetch the
It should be doing that but looks the logic is wrong. It's looking to see if the script is running on CI. I believe I thought the But from the error log it looks like the script was able to set up node correctly, so doesn't look like there are any problems with your nvm setup:
That is misleading since the next The issue is that Go executes commands in a nested bash shell. It's possible to set a different shell in the command but that could get complicated. One work around is to add the
It's not a hard dependency.
This already happens by checking for the
That could get complicated very quickly. As noted above, Go runs commands in bash so if the supplied switch command is only set up in the users default shell then it won't work. We'd have to add another flag to specify the shell or a script that will load the preferred node manager into bash. Or have folks make sure the node manager is loaded in Since this is a highly specialized tool used by a few people, I think the best option is to fix #240 and provide guidance on how to wire in other node managers as needed. |
Correct. I was specifically providing feedback on the suggestion to invoke
I agree the CLI should work with
Great idea!
That does get complex quickly. To be clear, this is the type of complexity threshold where I think it would be very reasonable to reject support for Thank you for your hard work on this CLI. It is an meaningfully impactful tool for lowering the project's operational overheard. |
Ah ok. makes sense. I don't foresee any reason to make
I think we are an the same page here. As I mentioned, since this is such a specialized tool for a small group of people I think it's fine to wire in a few different node managers. To be honest I can only think of 3: I don't think there is a risk of falling back to a hard dependency. I do remember throwing that at you while you were on leave with the Jetpack setup in Mobile Gutenberg 😄 . Genuinely don't want to do that again ! |
The script failed with the following error when creating a release:
I didn't have the default
node
version set to the expected version of Gutenberg, which explains the error. However, it failed after creating the branches. I propose checking for thenode
andnpm
versions needed to run the scripts in Gutenberg and Gutenberg Mobile as a first step.Ideally, the script should switch to the needed version by running
nvm use
.The text was updated successfully, but these errors were encountered: