How do I generate/download sourcemaps using eas build?

Removing expo-cli as a devDependency resulted in a weird situation in Github Actions. I think this is specific to GitHub’s env since running the exact same command worked locally.

I’m always learning haha!

I haven’t used GitHub actions for building Expo apps yet. What is it that ran npx expo-cli doctor? Can you change it to run expo-cli doctor instead?

image

I’m not entirely sure what runs things. I will do more reading and report back.

I am also going to try npm install -g expo-cli before executing this line. I used to have:

image

I assumed since I removed it as a dependency that yarn would not be able to find it. I will try it anyways as well. Perhaps I should make it a peerDependency. So much to try and so much to learn about :laughing:

I think that’s a good idea.

Any reason you can’t just put expo-cli doctor where you used to have yarn run expo doctor?

Any reason you can’t just put expo-cli doctor where you used to have yarn run expo doctor ?

Because I assumed expo-cli needs to be either installed as some form of dependency or installed globally. Once it was removed from devDependencies I assumed it was no longer available.

Sorry, I meant in addition to installing it globally like you said here:

Oh, for some reason I did not, until now, see the image where you have the following:

- name: Run expo doctor
  run: npx expo-cli doctor

When I asked “what is it that ran npx expo-cli doctor”, basically I was wondering where that was defined, and if it was in something you wrote/could modify. The answer appears to be that it’s in some sort of config file that you can indeed modify.

I don’t understand why you got the “$ expo doctor is not supported in the local CLI, please use expo-cli doctor instead” message, because npx should install it (as it says it’s doing in the screenshot), but either way, I think installing expo-cli globally should avoid that problem.

I tried the following

- name: Run expo doctor
  run: npm install -g expo-cli && expo doctor

But I guess how it works has changed since the version I used since it exits with code 1 which interrupts my build process now.

- Finding all copies of expo-modules-autolinking
37
- Finding all copies of @expo/config-plugins
38
[16:15:31] Expected package @expo/config-plugins@^5.0.0
39
[16:15:31] Found invalid:
40
- Finding all copies of @expo/prebuild-config
41
[16:15:31]   @expo/config-plugins@4.1.5
42
  @expo/config-plugins@4.1.5
43
  @expo/config-plugins@4.1.5
44
[16:15:31]   (for more info, run: npm why @expo/config-plugins)
45
- Finding all copies of @unimodules/core
46
- Finding all copies of @unimodules/react-native-adapter
47
- Finding all copies of react-native-unimodules
48
Error: Process completed with exit code 1.- Finding all copies of expo-modules-autolinking
37
- Finding all copies of @expo/config-plugins
38
[16:15:31] Expected package @expo/config-plugins@^5.0.0
39
[16:15:31] Found invalid:
40
- Finding all copies of @expo/prebuild-config
41
[16:15:31]   @expo/config-plugins@4.1.5
42
  @expo/config-plugins@4.1.5
43
  @expo/config-plugins@4.1.5
44
[16:15:31]   (for more info, run: npm why @expo/config-plugins)
45
- Finding all copies of @unimodules/core
46
- Finding all copies of @unimodules/react-native-adapter
47
- Finding all copies of react-native-unimodules
48
Error: Process completed with exit code 1.

Well, to be fair, it does say “Found invalid:”, so it seems appropriate to exit with a non-zero code. If you want to ignore the exit code, add “|| true” on the end

Totally agree :slight_smile:

add “|| true ” on the end

I will do this for now. thank you!

Following up. I’ve had the best luck with

npm install -g expo-cli && expo doctor

Previously I was using expo doctor to ensure that automatically bumped dependencies didn’t go above the supported versions by expo. I need to look into why I’m getting these new errors.

Thank you for all the assistance!

1 Like

Hey @grossadamm,

Could you please tell how you were able to do so?
I am also trying to generate the sourcemap in eas build.

1 Like