We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8688728 commit 2dcfe92Copy full SHA for 2dcfe92
packages/react-native-node-api-modules/src/node/path-utils.ts
@@ -55,13 +55,9 @@ export function isNodeApiModule(modulePath: string): boolean {
55
// Then check if it's readable (behavior differs by platform)
56
if (process.platform === 'win32') {
57
// On Windows, we need to try to open the file to check read permissions
58
- try {
59
- const fd = fs.openSync(filePath, 'r');
60
- fs.closeSync(fd);
61
- return true;
62
- } catch (e) {
63
- throw new Error(`Found an unreadable module ${fileName}: ${e}`);
64
- }
+ const fd = fs.openSync(filePath, 'r');
+ fs.closeSync(fd);
+ return true;
65
} else {
66
// On Unix-like systems, we can use R_OK to check read permissions
67
fs.accessSync(filePath, fs.constants.R_OK);
0 commit comments