Print a warning when used with Node versions other than v16.15.0 #4366
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.
Description
Warn in development when running the JavaScript frontend with unsupported Node or NPM version.
Summary
Issue a warning if not running with npm 8.5.5, since the errors that you get if you run a different version are not very obvious.
Show on preinstall. Since it's easy to miss there, also show it on other run scripts such as 'watch'.
Screenshot
Notes for reviewer
Decisions that came up:
npm install
is attempted with an unsupportednpm
version?npm install
, as apreinstall
step. Yet since that message doesn't print immediately, and may get buried in the various messagesnpm install
prints out, also run it onbuild
,watch
,test
, andtest-autobuild
.postinstall
aftercopy-fonts
, making it more prominent. It's still a bit buried though.eval "$(fnm env --use-on-cd)"
, which reads.node-version
and switches tov16.15.0
whenever you enter the kpi folder in the terminal.Checklist
Related issues
Related to #3851