Docs: Prescribe latest NPM for development environment #21017
Merged
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.
Related: #14201, #18923
This pull request seeks to prescribe that the latest version of NPM should be used in developing Gutenberg, not merely the version which ships with the latest active LTS release of Node.js
Rationale:
Historically, there have been a number of issues which surface in relation to inconsistent versions of NPM being used by contributors, typically attributable to various bugs (and subsequent fixes of bugs) in NPM itself.
Example: #16157 (comment)
At one time, we did have a mention in documentation that the latest NPM should be used (source). This was removed as part of the changes in #17004. In #18923, we reintroduced the Node LTS support commitment, but did not reintroduce the intention to use the latest NPM.
Finally, our build environment is configured to use the latest NPM release (source). As such, without encouraging developers to follow suit, there is a higher likelihood that the behavior of NPM in the build environment may be different than in the developer's own environment. This could result in unexpected build failures, for example.
Ideally we'd have some easier way to enforce that a developer is always running the latest NPM version. There are a few challenges to this, both technically (#14201) and in terms of developer experience (NPM releases tend to be more frequent than Node LTS maintenance releases).
Testing Instructions:
As this pull request affects only documentation, it is not expected to have any impact on the application runtime.