From 33b4e57b0875d7282a5e70950614e375e23615c7 Mon Sep 17 00:00:00 2001 From: Dylan Staley <88163+dstaley@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:31:01 -0800 Subject: [PATCH] fix ReferenceError --- src/next-transpile-modules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/next-transpile-modules.js b/src/next-transpile-modules.js index b86ba61..ec809c4 100644 --- a/src/next-transpile-modules.js +++ b/src/next-transpile-modules.js @@ -122,7 +122,7 @@ const withTmInitializer = (modules = [], options = {}) => { */ const getPackageRootDirectory = (module) => { try { - packageLookupDirectory = resolve(CWD, path.join(module, 'package.json')); + const packageLookupDirectory = resolve(CWD, path.join(module, 'package.json')); return path.dirname(packageLookupDirectory); } catch (err) { throw new Error(