Skip to content

Commit ff5713c

Browse files
committedJan 22, 2025
change reference path
1 parent 065ef86 commit ff5713c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed
 

‎src/bundle.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,12 @@ async function compileHermesByteCode(
335335

336336
async function copyDebugidForSentry(bundleName, outputFolder, sourcemapOutput) {
337337
if (sourcemapOutput) {
338-
const copyDebugidPath =
339-
'node_modules/@sentry/react-native/scripts/copy-debugid.js';
338+
const copyDebugidPath = require.resolve(
339+
'@sentry/react-native/scripts/copy-debugid.js',
340+
{
341+
paths: [process.cwd()],
342+
},
343+
);
340344
if (!fs.existsSync(copyDebugidPath)) {
341345
return;
342346
}
@@ -362,8 +366,12 @@ async function uploadSourcemapForSentry(
362366
sourcemapOutput,
363367
) {
364368
if (sourcemapOutput) {
365-
const uploadSourcemapPath =
366-
'node_modules/@sentry/cli/bin/sentry-cli';
369+
const uploadSourcemapPath = require.resolve(
370+
'@sentry/cli/bin/sentry-cli',
371+
{
372+
paths: [process.cwd()],
373+
},
374+
);
367375
if (!fs.existsSync(uploadSourcemapPath)) {
368376
return;
369377
}

0 commit comments

Comments
 (0)