Fix #17: Add Node.js version check with clear error message#77
Open
bluerook2000 wants to merge 2 commits intoVibiumDev:mainfrom
Open
Fix #17: Add Node.js version check with clear error message#77bluerook2000 wants to merge 2 commits intoVibiumDev:mainfrom
bluerook2000 wants to merge 2 commits intoVibiumDev:mainfrom
Conversation
Add a checkNodeVersion() utility that validates Node.js >= 18.0.0 at browser launch time, providing a clear actionable error message instead of cryptic failures when running on older versions. Changes: - Add clients/javascript/src/utils/version.ts with version check - Call checkNodeVersion() at the start of browser.launch() - Add engines field to package.json declaring node >= 18.0.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When Vibium is run with an incompatible Node.js version (< 18), users get cryptic failures like Chrome not launching, with no indication that the Node.js version is the root cause (see #17).
Solution
Added a
checkNodeVersion()utility that runs at the start ofbrowser.launch()and throws a clear, actionable error if Node.js < 18 is detected:Changes
clients/javascript/src/utils/version.ts— New utility withcheckNodeVersion()functionclients/javascript/src/browser.ts— Call version check at the start oflaunch()clients/javascript/package.json— Addedenginesfield declaringnode >= 18.0.0Why this approach
enginesfield in package.json also lets npm/yarn warn during installCloses #17