Exp build Sentry hook fails on macOS


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?



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.


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

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

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

1 Like

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

(successfully publishes via “exp build” via CLI)

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

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)

42 PM

1 Like

Same issue…
node -v
npm -v

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

1 Like

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

1 Like

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

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.

I also have this issue, tried all the stuff above.

Unable to load postPublish hook: ‘sentry-expo/upload-sourcemaps’. The module does not export a function.
Please fix your postPublish hook configuration

Can someone screenshot the exact location of the organization name and the project name? Am I stupid and filling in the wrong data or is it something else?

node -v