From 6c854c188211a6ca3f19895dd63edf0a948e5240 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Sun, 11 Sep 2022 21:52:10 +0000 Subject: [PATCH] Build/Test: Prevent using unsupported NPM versions. Using NPM 7+ currently causes a number of issues. In order to improve developer experience, we should prevent a developer from going down the road of using incompatible engines. See also: https://github.com/WordPress/gutenberg/pull/29204 and https://github.com/WordPress/gutenberg/pull/23600. Props rcorrales. Fixes #56547. git-svn-id: https://develop.svn.wordpress.org/trunk@54124 602fd350-edb4-49c9-b593-d223f7449a82 --- .npmrc | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.npmrc b/.npmrc index 1dab4ed4c3020..aafab1669bf72 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ save-exact = true +engine-strict = true diff --git a/package.json b/package.json index 825a5714bfe1e..6429aea0b1c93 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "engines": { "node": ">=14.15.0", - "npm": ">=6.14.8" + "npm": ">=6.14.8 <7" }, "author": "The WordPress Contributors", "license": "GPL-2.0-or-later",