expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
34.44k stars 5.52k forks source link

`npx create-expo-app@latest` is failing with link-react-compiler-runtime.sh: not found #31912

Closed ecruzolivera closed 1 month ago

ecruzolivera commented 1 month ago

Edit(@byCedric): if you still run into this issue, check Expo's comment for more information


Summary

Suddenly (2024-10-07), if I run npx create-expo-app@latest TestExpo the install process gets forever and finally fails with:

Using npm

pm error code 127
npm error path /home/ernesto/Scratchpad/TestExpo/node_modules/babel-plugin-react-compiler
npm error command failed
npm error command sh -c ./scripts/link-react-compiler-runtime.sh
npm error sh: 1: ./scripts/link-react-compiler-runtime.sh: not found
npm error A complete log of this run can be found in: /home/ernesto/.npm/_logs/2024-10-08T01_05_52_912Z-debug-0.log
Something went wrong installing JavaScript dependencies. Check your npm logs. Continuing to create the app.
Error: npm install exited with non-zero code: 127

Full logs:

2024-10-08T01_05_52_912Z-debug-0.log

Using yarn

[4/4] Building fresh packages...
verbose 32.140710131 Error: /home/ernesto/Scratchpad/TestExpo/node_modules/babel-plugin-react-compiler: Command failed.
Exit code: 127
Command: ./scripts/link-react-compiler-runtime.sh
Arguments:
Directory: /home/ernesto/Scratchpad/TestExpo/node_modules/babel-plugin-react-compiler
Output:
/bin/sh: 1: ./scripts/link-react-compiler-runtime.sh: not found
    at ProcessTermError.ExtendableBuiltin (/home/ernesto/.local/share/mise/installs/node/20.17.0/lib/node_modules/yarn/lib/cli.js:721:66)
    at ProcessTermError.MessageError (/home/ernesto/.local/share/mise/installs/node/20.17.0/lib/node_modules/yarn/lib/cli.js:750:123)
    at new ProcessTermError (/home/ernesto/.local/share/mise/installs/node/20.17.0/lib/node_modules/yarn/lib/cli.js:790:113)
    at ChildProcess.<anonymous> (/home/ernesto/.local/share/mise/installs/node/20.17.0/lib/node_modules/yarn/lib/cli.js:25789:17)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:339:12)
error /home/ernesto/Scratchpad/TestExpo/node_modules/babel-plugin-react-compiler: Command failed.
Exit code: 127
Command: ./scripts/link-react-compiler-runtime.sh
Arguments:
Directory: /home/ernesto/Scratchpad/TestExpo/node_modules/babel-plugin-react-compiler
Output:
/bin/sh: 1: ./scripts/link-react-compiler-runtime.sh: not found

Yesterday I was able to create a project just fine

What platform(s) does this occur on?

No response

SDK Version

latest

Environment

expo-env-info 1.2.0 environment info:
    System:
      OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
      Shell: 5.9 - /usr/bin/zsh
    Binaries:
      Node: 20.17.0 - ~/.local/share/mise/installs/node/lts/bin/node
      Yarn: 1.22.22 - ~/.local/share/mise/installs/node/lts/bin/yarn
      npm: 10.9.0 - ~/.local/share/mise/installs/node/lts/bin/npm
      Watchman: 4.9.0 - /usr/bin/watchman
    npmGlobalPackages:
      eas-cli: 12.5.1
    Expo Workflow: managed


### Minimal reproducible example

Just run `npx create-expo-app@latest Example`
SkorpionG commented 1 month ago

I have the same issue here. Initially, I thought the problem was in my npm, but npm works fine with my other react project.

ddikodroid commented 1 month ago

i'm getting the same issue

Screenshot 2024-10-08 at 09 34 14
RazvanGorea commented 1 month ago

same

caltamiranob commented 1 month ago

i have the same issue

nathangemtech commented 1 month ago

I am getting same error

Louis-Westmoreland commented 1 month ago

same

xuoutput commented 1 month ago

same

rosko commented 1 month ago

Same here as well

npm error code 127
npm error path /Users/rosko/Projects/my-app/node_modules/babel-plugin-react-compiler
npm error command failed
npm error command sh -c ./scripts/link-react-compiler-runtime.sh
npm error sh: ./scripts/link-react-compiler-runtime.sh: No such file or directory
npm error A complete log of this run can be found in: /Users/rosko/.npm/_logs/2024-10-08T03_04_39_259Z-debug-0.log
Something went wrong installing JavaScript dependencies. Check your npm logs. Continuing to create the app.
Error: npm install exited with non-zero code: 127

✅ Your project is ready!

Log:

6443 info run fsevents@2.3.3 install node_modules/fsevents node-gyp rebuild
6444 info run fsevents@2.3.3 install { code: 1, signal: null }
6445 verbose reify failed optional dependency /Users/rosko/Projects/my-app/node_modules/fsevents
6446 silly reify mark deleted [ '/Users/rosko/Projects/my-app/node_modules/fsevents' ]
6447 info run babel-plugin-react-compiler@0.0.0-experimental-7779988-20241007 postinstall node_modules/babel-plugin-react-compiler ./scripts/link-react-compiler-runtime.sh
6448 info run babel-plugin-react-compiler@0.0.0-experimental-7779988-20241007 postinstall { code: 127, signal: null }
6449 verbose stack Error: command failed
6449 verbose stack     at promiseSpawn (/Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:22:22)
6449 verbose stack     at spawnWithShell (/Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:124:10)
6449 verbose stack     at promiseSpawn (/Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:12:12)
6449 verbose stack     at runScriptPkg (/Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:77:13)
6449 verbose stack     at runScript (/Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js:9:12)
6449 verbose stack     at /Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:329:17
6449 verbose stack     at run (/Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/promise-call-limit/dist/commonjs/index.js:67:22)
6449 verbose stack     at /Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/promise-call-limit/dist/commonjs/index.js:84:9
6449 verbose stack     at new Promise (<anonymous>)
6449 verbose stack     at callLimit (/Users/rosko/.nvm/versions/node/v20.17.0/lib/node_modules/npm/node_modules/promise-call-limit/dist/commonjs/index.js:35:69)
6450 verbose pkgid babel-plugin-react-compiler@0.0.0-experimental-7779988-20241007
6451 error code 127
6452 error path /Users/rosko/Projects/my-app/node_modules/babel-plugin-react-compiler
6453 error command failed
6454 error command sh -c ./scripts/link-react-compiler-runtime.sh
6455 error sh: ./scripts/link-react-compiler-runtime.sh: No such file or directory
6456 silly unfinished npm timer reify 1728356679586
6457 silly unfinished npm timer reify:build 1728356704220
6458 silly unfinished npm timer build 1728356704222
6459 silly unfinished npm timer build:deps 1728356704223
6460 silly unfinished npm timer build:run:postinstall 1728356705180
6461 silly unfinished npm timer build:run:postinstall:node_modules/babel-plugin-react-compiler 1728356705180
6462 verbose cwd /Users/rosko/Projects/my-app
6463 verbose os Darwin 23.6.0
6464 verbose node v20.17.0
6465 verbose npm  v10.8.2
6466 verbose exit 127
6467 verbose code 127
rosko commented 1 month ago

As a temporary solution, I added the following to devDependencies in package.json

"babel-plugin-react-compiler": "0.0.0-experimental-592953e-20240517"
ravindUwU commented 1 month ago

I'm not using the React compiler just yet, so as an interim fix I was able to override the version of babel-plugin-react-compiler to 0.0.0-experimental-734b737-20241003 (which is the version that immediately precedes the latest version as of right now, listed at https://www.npmjs.com/package/babel-plugin-react-compiler?activeTab=versions#version-history), and have it install successfully.

i.e., "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003" in overrides/resolutions/devDependencies, remove node_modules, reinstall.

I'm guessing this will be fixed when https://github.com/facebook/react/pull/31147 is published 🤔

ddikodroid commented 1 month ago

As a temporary solution, I added the following to devDependencies in package.json

"babel-plugin-react-compiler": "0.0.0-experimental-592953e-20240517"

i'm still getting the error on fresh project

error /Users/diko/Documents/Project/risk-management/node_modules/babel-preset-expo/node_modules/babel-plugin-react-compiler: Command failed.
Exit code: 127
Command: ./scripts/link-react-compiler-runtime.sh
Arguments: 
Directory: /Users/diko/Documents/Project/risk-management/node_modules/babel-preset-expo/node_modules/babel-plugin-react-compiler
Output:
/bin/sh: ./scripts/link-react-compiler-runtime.sh: No such file or directory
treymorgan commented 1 month ago

same issue.

TowhidKashem commented 1 month ago

this will let it build successfully in the mean time:

  "resolutions": {
    "**/babel-plugin-react-compiler": "0.0.0-experimental-ca8e0be-20240916"
  },

but only if you already have a yarn.lock file. If you don't (such as in CI) it will still fail to build.

vitor3g commented 1 month ago

same

f1rstf1y9 commented 1 month ago

same issue😞

BoChingLee commented 1 month ago

same issue...

snorlaxbubba commented 1 month ago

oh my god i'm so happy to have come across this, I literally did a build 24 hours ago that worked fine

basememara commented 1 month ago

I tried "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003" but didn't work for me. any other workarounds or what expo version should we try?

SagarAhir commented 1 month ago

facing same issue

basememara commented 1 month ago

I tried going back a few versions back for expo and even babel, but seems like the internal dependency is still broken. completely blocked from any new expo project

tuanlongn commented 1 month ago

@basememara You can try using yarn install --ignore-scripts as a workaround.

basememara commented 1 month ago

Thx that did get me past the install and not sure what the implications of that is. However, when I try to do anything else after that, like npx expo install expo-dev-client, it gives this error:

error /Users/*/node_modules/@babel/core: Command failed.
Exit code: 1
Command: node scripts/postinstall.js
Arguments: 
Directory: /Users/*/node_modules/@babel/core
Output:
node:internal/modules/esm/resolve:844
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'is-ci' imported from /Users/*/node_modules/@babel/core/scripts/postinstall.js
    at packageResolve (node:internal/modules/esm/resolve:844:9)
    at moduleResolve (node:internal/modules/esm/resolve:901:20)
    at defaultResolve (node:internal/modules/esm/resolve:1121:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.10.0
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: yarnpkg add expo-dev-client@~4.0.27 exited with non-zero code: 1
Error: yarnpkg add expo-dev-client@~4.0.27 exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/*/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
    ...
    at spawnAsync (/Users/*/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at YarnPackageManager.runAsync (/Users/*/node_modules/@expo/package-manager/build/node/BasePackageManager.js:41:42)
    at /Users/*/node_modules/@expo/package-manager/build/node/YarnPackageManager.js:35:127
    at /Users/*/node_modules/@expo/package-manager/build/utils/spawn.js:19:34
Punith-goud commented 1 month ago

this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead. npm warn deprecated @babel/plugin-proposal-async-generator-functions@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead. npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported npm warn deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported npm warn deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported npm warn cleanup Failed to remove some directories [ npm warn cleanup [ npm warn cleanup 'C:\zysk\reactNative\shubham-k-mart\node_modules\eol', npm warn cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\zysk\reactNative\shubham-k-mart\node_modules\eol'] { npm warn cleanup errno: -4082, npm warn cleanup code: 'EBUSY', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'C:\zysk\reactNative\shubham-k-mart\node_modules\eol' npm warn cleanup } npm warn cleanup ], npm warn cleanup [ npm warn cleanup 'C:\zysk\reactNative\shubham-k-mart\node_modules', npm warn cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\zysk\reactNative\shubham-k-mart\node_modules\eol'] { npm warn cleanup errno: -4082, npm warn cleanup code: 'EBUSY', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'C:\zysk\reactNative\shubham-k-mart\node_modules\eol' npm warn cleanup } npm warn cleanup ], npm warn cleanup [ npm warn cleanup 'C:\zysk\reactNative\shubham-k-mart\node_modules\@react-native\community-cli-plugin\node_modules\@react-native', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\zysk\reactNative\shubham-k-mart\node_modules\@react-native\community-cli-plugin\node_modules\@react-native'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'C:\zysk\reactNative\shubham-k-mart\node_modules\@react-native\community-cli-plugin\node_modules\@react-native' npm warn cleanup } npm warn cleanup ], npm warn cleanup [ npm warn cleanup 'C:\zysk\reactNative\shubham-k-mart\node_modules\expo-router\node_modules', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\zysk\reactNative\shubham-k-mart\node_modules\expo-router\node_modules'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'C:\zysk\reactNative\shubham-k-mart\node_modules\expo-router\node_modules' npm warn cleanup } npm warn cleanup ], npm warn cleanup [ npm warn cleanup 'C:\zysk\reactNative\shubham-k-mart\node_modules\expo-camera', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\zysk\reactNative\shubham-k-mart\node_modules\expo-camera\android\src'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'C:\zysk\reactNative\shubham-k-mart\node_modules\expo-camera\android\src' npm warn cleanup } npm warn cleanup ], npm warn cleanup [ npm warn cleanup 'C:\zysk\reactNative\shubham-k-mart\node_modules\react-native', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\zysk\reactNative\shubham-k-mart\node_modules\react-native\ReactAndroid\src\main\java\com\facebook\react\internal\turbomodule'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'C:\zysk\reactNative\shubham-k-mart\node_modules\react-native\ReactAndroid\src\main\java\com\facebook\react\internal\turbomodule' npm warn cleanup } npm warn cleanup ] npm warn cleanup ] npm error code 1 npm error path C:\zysk\reactNative\shubham-k-mart\node_modules\babel-plugin-react-compiler npm error command failed npm error command C:\Windows\system32\cmd.exe /d /s /c ./scripts/link-react-compiler-runtime.sh npm error '.' is not recognized as an internal or external command, npm error operable program or batch file. npm error A complete log of this run can be found in: C:\Users\PunithGoud\AppData\Local\npm-cache_logs\2024-10-08T06_47_34_687Z-debug-0.log PS C:\zysk\reactNative\shubham-k-mart>

i dont know if its my issue or its broken, i dont know what to do.

WebbkodsLarlingen commented 1 month ago

Adding this (se code below) to my package.json, then deleting node_modules folder and finally running npm install works for me:

"overrides": { "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003" },

This is on Windows 10 using just WSL (no WSL2 though) on latest version of VSCode. I did this AFTER running npx create-expo-app@latest and I will try now with blank project since I am just learning React Native Expo from scratch and I need a blank project to follow through on.

Step 1: Run npx create-expo-app@latest or npx create-expo-app@latest [app-name] --template blank@latest.

Step 2: Delete the node_modules folder.

Step 3: Add "overrides": {"babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003"}, to package.json file.

Step 4: Run npm install.

Step 5: Profit?

Thanks for all the help, fellas! ^_^

EDIT: I can confirm; these steps also work with npx create-expo-app@latest [your-app-name] --template blank@latest!

Best regards, WKF.

chan-stclab commented 1 month ago

Thank you genius people

chan-stclab commented 1 month ago

@ravindUwU Despite react repo PR merged, it didn't solved yet. another Issue raised. keep watching

Gabriel-Ivan5795 commented 1 month ago

Adding "babel-plugin-react-compiler": "0.0.0-experimental-592953e-20240517" in devDependencies seems works in my case

mozart25 commented 1 month ago

same

vlmcode commented 1 month ago

same

AndryanaBaros commented 1 month ago

Adding "babel-plugin-react-compiler": "0.0.0-experimental-592953e-20240517" in devDependencies seems works in my case

its not working for me . sad. :(

aviral-ioanyt commented 1 month ago

Same

erdemozkok commented 1 month ago

same problem and "overrides": { "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003" } doesn't work in my case

pixcai commented 1 month ago

same

hxzrx commented 1 month ago

Same error.

diyar730 commented 1 month ago

same error

nghiavohuynhdai commented 1 month ago

Add "overrides": { "babel-plugin-react-compiler": "0.0.0" }, to package.json file, then delete the node_modules folder and run npm install works for me

This is my package.json file: package.json

diogotl commented 1 month ago

sameeeee :(

diwashTiwari commented 1 month ago

I tried several ways, including uninstalling npm, updating it, and using Yarn, but nothing seemed to work.

However, this one worked for me

"overrides": {
  "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003"
}
hungnguyenviethatinh commented 1 month ago

"resolutions": { "**/babel-plugin-react-compiler": "0.0.0-experimental-ca8e0be-20240916" },

this worked, many thanks!

theodrosyimer commented 1 month ago

I tried several ways, including uninstalling npm, updating it, and using Yarn, but nothing seemed to work.

However, this one worked for me

"overrides": {
  "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003"
}

This worked for me using npm but did not work using pnpm

antenorq commented 1 month ago

The "overrides": { "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003" } WORKS FOR ME!

But I am getting this error: Starting project at C:\Users\anten\xxxxx Starting Metro Bundler Failed to resolve the Android SDK path. Default install location not found: C:\Users\anten\AppData\Local\Android\Sdk. Use ANDROID_HOME to set the Android SDK location.

diwashTiwari commented 1 month ago

The "overrides": { "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003" } WORKS FOR ME!

But I am getting this error: Starting project at C:\Users\anten\xxxxx Starting Metro Bundler Failed to resolve the Android SDK path. Default install location not found: C:\Users\anten\AppData\Local\Android\Sdk. Use ANDROID_HOME to set the Android SDK location.

The error is caused by a missing Android SDK, either because it's not installed or the path is not set correctly. If the SDK is installed, the ANDROID_HOME environment variable may not be configured properly, and the default location (C:\Users\anten\AppData\Local\Android\Sdk) cannot be found.

expo-bot commented 1 month ago

Thank you for filing this issue! This comment acknowledges we believe this may be a bug and there’s enough information to investigate it. However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

byCedric commented 1 month ago

Hey all! This is caused by the babel-plugin-react-compiler package itself, they accidentally published a version that contains an incorrect postinstall script. See https://github.com/facebook/react/issues/31150

byCedric commented 1 month ago

For now, we will issue a hotfix for babel-preset-expo, as this is the package that pulls the react compiler into Expo projects.

You can also install with npm install --ignore-scripts, to avoid the problematic postinstall hook in the react compiler. Or, you could change the the installed version through resolutions/overrides. That should get you unblocked for now.

mlazari commented 1 month ago

This worked for me using npm but did not work using pnpm

@theodrosyimer It looks like for pnpm you have to put the overrides under a "pnpm" key (https://pnpm.io/package_json#pnpmoverrides) like this:

"pnpm": {
  "overrides": {
    "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003"
  }
}

For yarn I think it would be:

  "resolutions": {
    "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003"
  }
erdemozkok commented 1 month ago

For yarn I think it would be:

  "resolutions": {
    "babel-plugin-react-compiler": "0.0.0-experimental-734b737-20241003"
  }

works for me

byCedric commented 1 month ago

Hey all! We've issued an emergency hotfix for babel-preset-expo@11.0.15. This pins the React Compiler version to an older but working one. We've also pinged Meta to get a proper fix for babel-plugin-react-compiler ASAP.

For now, it's likely that using experiments.reactCompiler = true will break your project. But if you don't use the React Compiler experiment, your project will install normally.

If you still encounter this, update your lock file to install babel-preset-expo@11.0.15 for SDK 51, not babel-preset-expo@<=11.0.14. New projects created with npx create-expo(-app) should work again.

[!IMPORTANT] babel-preset-expo is a dependency of expo and, preferably, should not be installed directly in your project. However, you can force-update your lockfile by running npm i --save babel-preset-expo@11.0.15 - and then removing this package again. npm's optimization should update the dependency chain expo@51 -> babel-preset-expo@11.0.15 by doing so.

Sorry for the trouble!

reactWebztechieMD commented 1 month ago

i am getting this error when i am making build

diyar730 commented 1 month ago

Hey all! We've issued an emergency hotfix for babel-preset-expo@11.0.15. This pins the React Compiler version to an older but working one. We've also pinged Meta to get a proper fix for babel-plugin-react-compiler ASAP.

For now, it's likely that using experiments.reactCompiler = true will break your project. But if you don't use the React Compiler experiment, your project will install normally.

If you still encounter this, update your lock file to install babel-preset-expo@11.0.15 for SDK 51, not babel-preset-expo@<=11.0.14. New projects created with npx create-expo(-app) should work again.

Important

babel-preset-expo is a dependency of expo and, preferably, should not be installed directly in your project. However, you can force-update your lockfile by running npm i --save babel-preset-expo@11.0.15 - and then removing this package again. npm's optimization should update the dependency chain expo@51 -> babel-preset-expo@11.0.15 by doing so.

Sorry for the trouble!

Thanks Cedric. npx create-expo-app@latest command works again.