Exp build Sentry hook fails on macOS

#1

Hi,

The “build:ios” and “build:android” commands are working for me on Linux, but when I try it on macOS I get the following:

[exp] Publishing...
[exp] Unable to load postPublishHook: 'sentry-expo/upload-sourcemaps'
[exp] Please fix your postPublish hook configuration.

It works fine on Linux. I have sentry-cli 1.13.0 on Linux and 1.13.3 on macOS if that makes any difference.

Is there any easy way to debug?

Thanks

2 Likes

#2

I missed the part of the docs about upgrade Node to 7.6+, I was on 6.11.0. Strange, I was on an even earlier version on Linux.

That has fixed it, although upgrading npm to v5 seems to have caused other issues.

2 Likes

#3

indeed, npm5 is really broken right now. I don’t recommend using it, you can use yarn or npm 4.6.1

0 Likes

#4

I had the same problem too!
It’s the node version. Thank you so much. I totally missed it.

0 Likes

#5

Seem to have the same issue with these settings:
Now using system version of node: v6.11.2 (npm v4.6.1)

1 Like

#6

Having issue as well (from Expo XDE Publish) with:
node: v7.10.0
npm: v4.2.0

(successfully publishes via “exp build” via CLI)

0 Likes

#7

I had to keep restarting until it eventually worked for me.

0 Likes

#8

you need to use a more recent version of node, notice in the docs (https://docs.expo.io/versions/latest/guides/using-sentry.html#install-and-configure-sentry)

1 Like

#9

Same issue…
node -v
v6.0.0
npm -v
3.8.6

0 Likes

#10

Node version 7.6 or newer is needed, as notbrent mentioned above.

1 Like

#11

Just in case anyone else runs into this issue and still has problems when using the correct node version, you may have the issue I have. I am running expo in a monorepo configuration (think lerna/yarn workspaces). In this case, “sentry-expo” may not be in your app modules folder (it may live in a parent node_modules), and the XDL Project.js file is looking for it in your package dir. To fix it, simply set the “file” property to the full path of sentry-expo/upload-sourcemaps, i.e. your monorepo_root/node_modules/sentry-expo/upload-sourcemaps

2 Likes

#12

I was facing the same issue. It works now after I started using Node version 8.11.1 (npm version 5.6.0)

0 Likes

#13

I had same problem and resolve it.
I installed ‘react-native-sentry’. if using expo, it is wrong.
I remove it and install ‘sentry-expo’ and it works.

0 Likes