repack icon indicating copy to clipboard operation
repack copied to clipboard

Error: no such file or directory, open '/Users/x/dev/client/packages/app/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js'"

Open jhso-dev opened this issue 8 months ago • 0 comments

Environment

RN 0.73.7 Repack 4.1.1

Description

When I set the reactNativePath to new URL("../../node_modules/react-native", import.meta.url).pathname, I got the error as shown below.

	const {
		mode = "development",
		context = Repack.getDirname(import.meta.url),
		entry = "./index.js",
		platform = process.env.PLATFORM,
		minimize = mode === "production",
		devServer = undefined,
		bundleFilename = undefined,
		sourceMapFilename = undefined,
		assetsPath = undefined,
		reactNativePath = new URL("../../node_modules/react-native", import.meta.url).pathname,
	} = env
✖ [15:52:25.227Z][DevServer] Failed to create code frame {
  reqId: 'req-g',
  error: "ENOENT: no such file or directory, open '/Users/x/dev/client/packages/app/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js'"
} 
ℹ [15:52:25.227Z][DevServer] POST 200 /symbolicate request completed { responseTime: 808.1850829720497 } 

I think line 184 should be changed to path.join(reactNativePath, 'Libraries/LogBox/Data/LogBoxData.js').

jhso-dev avatar Jun 16 '24 16:06 jhso-dev