diff --git a/lib/tasks/webpacker/check_yarn.rake b/lib/tasks/webpacker/check_yarn.rake index 3fc514ace..4b799e7e3 100644 --- a/lib/tasks/webpacker/check_yarn.rake +++ b/lib/tasks/webpacker/check_yarn.rake @@ -9,7 +9,7 @@ namespace :webpacker do pkg_path = Pathname.new("#{__dir__}/../../../package.json").realpath yarn_range = JSON.parse(pkg_path.read)["engines"]["yarn"] is_valid = SemanticRange.satisfies?(yarn_version, yarn_range) rescue false - is_unsupported = SemanticRange.satisfies?(yarn_version, ">=3.0.0") rescue false + is_unsupported = SemanticRange.satisfies?(yarn_version, ">=4.0.0") rescue false unless is_valid $stderr.puts "Webpacker requires Yarn \"#{yarn_range}\" and you are using #{yarn_version}" diff --git a/package.json b/package.json index 87c4f0270..6a2588aeb 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ ], "engines": { "node": ">=10.17.0", - "yarn": ">=1 <3" + "yarn": ">=1 <4" }, "dependencies": { "@babel/core": "^7.14.3",