File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
packages/profiling-node/src Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,16 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
5454 return createdRequire ( `${ binaryPath } .node` ) ;
5555 }
5656
57- // @electron /rebuild generates the binary in the generic node-gyp directory
58- try {
59- return createdRequire ( '../../build/Release/sentry_cpu_profiler.node' ) ;
60- } catch ( _ ) {
61- // ignore
57+ if ( process . versions . electron ) {
58+ try {
59+ // @electron /rebuild generates the binary in the generic node-gyp directory
60+ return createdRequire ( '../../build/Release/sentry_cpu_profiler.node' ) ;
61+ } catch ( _ ) {
62+ // eslint-disable-next-line no-console
63+ console . warn (
64+ "Could not find '@sentry/profiling-node' binary. You should use '@electron/rebuild' to rebuild the native module." ,
65+ ) ;
66+ }
6267 }
6368
6469 // We need the fallthrough so that in the end, we can fallback to the dynamic require.
You can’t perform that action at this time.
0 commit comments