#56547 closed defect (bug) (fixed)
Prevent using npm 7 until gutenberg supports it
Reported by: | jorbin | Owned by: | jorbin |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | good-first-bug has-patch |
Focuses: | Cc: |
Description
Since https://github.com/WordPress/gutenberg/pull/29204, gutenberg has required NPM 6. As much of WordPress depends on JS from there, we should match NPM requirements
Attachments (1)
Change History (6)
#2
@
2 years ago
You can test this fix by installing a version > 6:
npm i -g npm@7
Then, when you would get this error when running npm install
:
npm ERR! code EBADENGINE npm ERR! engine Unsupported engine npm ERR! engine Not compatible with your version of node/npm: WordPress@6.1.0 npm ERR! notsup Not compatible with your version of node/npm: WordPress@6.1.0 npm ERR! notsup Required: {"node":">=14.15.0","npm":">=6.14.8 <7"} npm ERR! notsup Actual: {"npm":"7.24.2","node":"v16.13.0"}
This ticket was mentioned in PR #3232 on WordPress/wordpress-develop by aaronjorbin.
2 years ago
#3
- Keywords has-patch added
#4
@
2 years ago
- Owner set to jorbin
- Resolution set to fixed
- Status changed from new to closed
In 54124:
aaronjorbin commented on PR #3232:
2 years ago
#5
Note: See
TracTickets for help on using
tickets.
I attached a patch that limits the npm version to 6 and sets
engine-strict = true
in.npmrc
so it stops the installation if the version is not supported.