Skip to content

chore: preinstall script for node version checking #1580

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

madblex
Copy link
Contributor

@madblex madblex commented Mar 19, 2025

Asana Task/Github Issue:

Description

Introduces a preinstall script that fails npm i commands early if the node version does not match the one in .npmrc

before it was failing at the build step with no context after: fails early at npm install step with clear error
Screenshot 2025-03-19 at 9 31 15 AM Screenshot 2025-03-19 at 9 31 15 AM

Testing Steps

  • to see it fail:
$ nvm use 18
$ npm i
  • to see it succeed:
$ nvm use
$ npm i

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit 2f4f087
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/68305ca24e57f30008e83bc0
😎 Deploy Preview https://deploy-preview-1580--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

github-actions bot commented Mar 19, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

@madblex madblex force-pushed the madblex/pre-install-script branch from 1a03a68 to 36e93b9 Compare March 19, 2025 10:26
@madblex madblex marked this pull request as ready for review March 19, 2025 15:53
@madblex madblex requested a review from a team as a code owner March 19, 2025 15:53
@madblex
Copy link
Contributor Author

madblex commented Mar 19, 2025

@jonathanKingston @shakyShane funny enough, this is failing on the CI as it's using the wrong node version? 😅

@shakyShane shakyShane force-pushed the madblex/pre-install-script branch from c791c47 to f0d6e2f Compare April 16, 2025 09:24
@jonathanKingston
Copy link
Contributor

I think this is probably safe to land, clicked update on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants