diff --git a/lib/linter/node-event-generator.js b/lib/linter/node-event-generator.js
index d56bef2fa9defde5473775643accc90ced99a8a6..7262e1f41d80b883c076ad868d9afb618dd2ac7f 100644
--- a/lib/linter/node-event-generator.js
+++ b/lib/linter/node-event-generator.js
@@ -9,7 +9,7 @@
 // Requirements
 //------------------------------------------------------------------------------
 
-const esquery = require("esquery");
+const esquery = require("esquery").default || require("esquery");
 
 //------------------------------------------------------------------------------
 // Typedefs
diff --git a/lib/rule-tester/rule-tester.js b/lib/rule-tester/rule-tester.js
index 48df3b79b943dc0f6138c9ca374c20bf8ed8863b..34100b71a3040cccce85690ebb292ca45ff6ab79 100644
--- a/lib/rule-tester/rule-tester.js
+++ b/lib/rule-tester/rule-tester.js
@@ -52,7 +52,7 @@ const
 
 const ajv = require("../shared/ajv")({ strictDefaults: true });
 
-const espreePath = require.resolve("espree");
+const espreePath = "";
 const parserSymbol = Symbol.for("eslint.RuleTester.parser");
 
 const { SourceCode } = require("../source-code");