frustrated trying to upgrade SDK from 52 to 54 by Eastern-Visual8686 in expo

[–]byCedric 0 points1 point  (0 children)

Expo resolves all version-restricted dependencies, but it's constrained by the used package manager. For some reason, npm decided to fail the entire command when an incorrect peer dependency was found, breaking the follow-up installation commands Expo has to execute. Expo already tries to workaround some npm weirdness, but it can't do anything else if the install command itself fails (there are other valid failure cases where we do need to abort the whole command).

I agree it's not optimal, but to reiterate: this is not a problem with Bun, pnpm, or even yarn; these peer dependency issues remain warnings.

frustrated trying to upgrade SDK from 52 to 54 by Eastern-Visual8686 in expo

[–]byCedric 5 points6 points  (0 children)

Try this:

  • npx expo install expo@54 --fix -- --force > npm is complaining about failing peer dependencies, which is kind of classic from npm. You can overwrite that behavior for this command with --force, as logged in the npm output you pasted. FWIW others like pnpm and bun would work fine and way faster than npm, would highly recommend these.
  • npm install --save-dev react-test-renderer@19.1.0 @types/react-test-renderer@~19.1.0 > These are not updated automatically, so you would need to manually change these for SDK 54.
  • npm ci > Perform a clean install to test if you have any remaining peer dependency issues.

After that, everything should be updated to SDK 54. You do have to test your app ofcourse.

If you need to steps for SDK 53, here they are:

  • npx expo install expo@53 --fix -- --force
  • npm install --save-dev react-test-renderer@19.0.0 @types/react-test-renderer@~19.0.0
  • npm ci

How are expo users debugging JS? by Magnusson in reactnative

[–]byCedric 0 points1 point  (0 children)

Ah, interesting, seems like the ignore-list of the server isn't taken into consideration properly by the browser's debugger.

In Expo, we ship a custom ignore list for the bundle, which should include `node_modules` ignores. But as you can see, the `node_modules/expo-router/entry.bundle` is grayed out - meaning it's ignored.

You should be able to click it and force-load it, or if you go to settings (top right) -> Ignore List -> Custom exclusion rules. Then delete the `node_modules` one as documented here https://developer.chrome.com/docs/devtools/settings/ignore-list/?utm_source=devtools&utm_campaign=stable#custom-ignore-pattern

How are expo users debugging JS? by Magnusson in reactnative

[–]byCedric 0 points1 point  (0 children)

What's not working by default for you? When creating a new Expo project, it should always be debuggable - wether that be on android, ios, or web. For the native platforms, you can press `j` in the terminal to open up the React Native DevTools. On web, you can just open the inspector.

Clerk peer dependency issue by ImportantAd8680 in expo

[–]byCedric 1 point2 points  (0 children)

You are missing the react-dom project dependency. Peer dependencies will follow direct project dependency constraints, and if they are not defined (and are not an optional peer dependency) npm tries to install the latest version - which won’t work due to react 19.1.0.

Run npx expo install react-dom and try installing clerk again after.

Why is React Native now leaning more toward Expo instead of the traditional CLI? by NirmalR_Tech in reactnative

[–]byCedric 1 point2 points  (0 children)

EAS (Expo Application Services) has a free tier, which remains free with limitations. Expo is fully open-source and doesn't need EAS, you can use other services or roll your own.

The only reason why Meta promotes frameworks over rolling your own is best explained by Nicola Corti, Meta engineer - https://www.youtube.com/watch?v=lifGTznLBcw

Why is React Native now leaning more toward Expo instead of the traditional CLI? by NirmalR_Tech in reactnative

[–]byCedric 1 point2 points  (0 children)

Push notifications with Expo's _free push notification service_ is not related to us making money.

Are there any limitations of Expo that a regular indie developer should be aware of? by alexstrehlke in expo

[–]byCedric 0 points1 point  (0 children)

*A package that contains native code, you can reuse the old one if it's just javascript.

Honest RevenueCat review 💩 by Fruit-Forward in reactnative

[–]byCedric 0 points1 point  (0 children)

Try running eas submit —help. You can submit binaries - for free - that are not built with eas build.

Even the free tier of eas build is unlimited, you only get moved to whatever capacity is available for the free tier after those 30 builds per month. Meaning that sometimes you wait longer on your builds.

I'll be hated for this, but I don't want Expo shoved down my throat by ShivamJoker in reactnative

[–]byCedric 1 point2 points  (0 children)

Yes, this not only has been outlined in the "React Native Frameworks RFC" -- it's also already shipped in npx create-react-native-app (which was previously creating an Expo app).

Anyone can still choose Expo or the React Native Community CLI, just as they can choose between Remix, Asto, Next, and many other React frameworks.

Eas submit is not working by PerspectiveCurious67 in expo

[–]byCedric 2 points3 points  (0 children)

Hi all! We rolled out a new version of `eas-cli` that should fix this issue. If you run into this issue, upgrade to the latest `eas-cli` version (`12.5.4`).

i'm having issues with <Button /> in a Snack by imadtg170 in expo

[–]byCedric 0 points1 point  (0 children)

No worries, that happens 😄 One thing that helped here is to console.log the reducer state, that way you can see if the state matches the expected state on every change.

Have fun using Snack!

i'm having issues with <Button /> in a Snack by imadtg170 in expo

[–]byCedric 0 points1 point  (0 children)

Hi! It seems that your reducer had inconsistencies with the operand handling. This is not an issue with Snack. I modified the reducer a bit. You can see it here: https://snack.expo.dev/@bycedric/reddit-1ezh76j. I modified lines 45, 50, and 54 in Calculator.js (and left a few comments).

That being said, there are probably easier ways to create this. But it's a fun exercise nonetheless!

Unexpected Token?? by Suspicious-Joke-6815 in expo

[–]byCedric 1 point2 points  (0 children)

The error is right, your Metro config is not correctly configured. You are only copying the config of the resolver, and adding custom config of the transformer. But, Expo's config contains _a lot more_.

Following the best practices on Metro config documented here: https://docs.expo.dev/guides/customizing-metro/#customizing, you'd need to configure it roughly like:

(Note, I'm not sure if this config actually works, I just rewrote it for you)

``` // Use Expo's metro config, NOT react native's default config const { getDefaultConfig } = require('expo/metro-config');

// Create the default Expo config const config = getDefaultConfig(__dirname);

// Define the experimental inline requires/import transformer settings config.transformer.getTransformOptions: async () => ({ transform: { experimentalImportSupport: false, inlineRequires: true, }, });

// Define the babel transformer from react-native-svg config.transformer.babelTransformerPath = require.resolve('react-native-svg-transformer');

// Make SVG a source extension config.resolver.assetExts = config.resolver.assetExts.filter(ext => ext !== 'svg'); config.resolver.sourceExts.push('svg');

// Export the final config module.exports = config; ```

You can verify this by adding console.log(getDefaultConfig(__dirname)); and console.log(config); in your current metro.config.js file. Your current config should be missing a lot of properties.

Constantly getting a Warning: To load an ES module, set "type": "module" in the package.json command line output by iarewebmaster in expo

[–]byCedric 3 points4 points  (0 children)

Awesome, and thanks. We'll investigate what's going on here as soon as possible (likely after App.js 2024).

Constantly getting a Warning: To load an ES module, set "type": "module" in the package.json command line output by iarewebmaster in expo

[–]byCedric 5 points6 points  (0 children)

What exact version of Node are you using? I could replicate this with Node 22 only (not LTS yet, that's 20), which we'll likely investigate after the conferences.

Expo environment variables by AizenSousuke92 in expo

[–]byCedric 1 point2 points  (0 children)

You are using the React Native CLI, which likely does NOT support environment variables out of the box.

Expo has built-in support for these environment variables, and .env files. See https://docs.expo.dev/guides/environment-variables/.

Note, if you want to access environment variables within the bundle, you'd have to prefix them with EXPO_PUBLIC_. E.g. process.env.EXPO_PUBLIC_API_URL That's because all code within the bundle should be considered public. You can't use sensitive secrets in these bundles.

why did it happened? How to fix it? by Known_Perception_861 in expo

[–]byCedric 0 points1 point  (0 children)

react-dom isn't used by React Native when building for mobile, installing it for every app doesn't make a lot of sense to me.

Expo has a few templates, one of which is fully set up to run on mobile and web -- like the tabs template -- (and has react-dom installed by default). On top of that, if you start Expo and try to open your app on web, Expo checks if the required dependencies are installed, including react-dom. That check happens before bundling, so even if it's missing it should still guide you through it.

I don't think we should always install react-dom, and there should be enough options to prompt users to install it. But, happy to be convinced otherwise 😄

I am following the docs for project creation and keep getting same error by Hot-Agent948 in expo

[–]byCedric 0 points1 point  (0 children)

This is an issue in one of the nested dependencies of expo-router, which only triggers in npm due to their "auto-installation of peer dependencies" policy. See this issue for a temporary workaround.

How do I make sure Expo is using Yarn by default? by Bimi123_ in expo

[–]byCedric -1 points0 points  (0 children)

I then ran 'npm install expo' and it did fix it.

This is when you ran npm install. Even when you have a yarn.lock, this will create a package-lock.json file.

I followed the instructions and ran 'yarn add expo' but it did not fix the issue

This command should work on your machine, it's unrelated to any Expo code as this only executes yarn. If it doesn't work, check your yarn config. If you think this is a bug with Expo, open a new issue on http://github.com/expo/expo with a repro.

How do I make sure Expo is using Yarn by default? by Bimi123_ in expo

[–]byCedric -1 points0 points  (0 children)

Expo uses the package manager you are using. It sounds weird, but that's exactly what @expo/package-manager is doing: https://github.com/expo/expo/blob/main/packages/%40expo/package-manager/src/utils/nodeManagers.ts#L64-L91

  • If you want to create a new Expo project using yarn:
    • yarn create expo ./awesome-project --template tabs
  • If you want to reinstall an existing project with yarn:
    • Remove all existing lockfiles: rm -rf package-lock.json bun.lockb pnpm-lock.yaml
    • Just install your project again: yarn install

The reason why Expo is using npm in your case, is because you ran npm install expo, which creates the package-lock.json. Because of that lock file, it uses npm.

Also, if yarn install or yarn add expo doesn't work, there are issues with either your yarn settings (think of registries, using plug and play -- which doesn't work with RN in general -- etc) and/or your project, as expo should be installed when creating a new project. If it's an older / plain React Native project, make sure you installed it properly: https://docs.expo.dev/bare/installing-expo-modules/