最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

android - expo-doctor failed during eas build but works in local - Stack Overflow

programmeradmin0浏览0评论

While building my app with this command: eas build --profile development --platform android

I have this error:

Running "expo doctor"
Enabled experimental React Native Directory checks. Unset the EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK environment variable to disable this check.
Running 15 checks on your project...
✔ Check package.json for common issues
✔ Check Expo config for common issues
✔ Check native tooling versions
✔ Check if the project meets version requirements for submission to app stores
✔ Check for common project setup issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check for issues with Metro config
✔ Validate packages against React Native Directory package metadata
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check npm/ yarn versions
✖ Check that packages match versions required by installed Expo SDK
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
Detailed check results:
sh: 1: expo: Permission denied
Advice: Use 'npx expo install --check' to review and upgrade your dependencies.
One or more checks failed, indicating possible issues with the project.
Command "expo doctor" failed.
npx -y expo-doctor exited with non-zero code: 1

Build failed
npx expo prebuild --no-install --platform android exited with non-zero code: 126

even though I don't have any problems when I do npx expo-doctor on my pc:

PS D:\projects\MYGRID\myGrid-react\MyGridApp> npx expo-doctor
WARNING: We recommend using PowerShell or Bash via WSL 2 for development with Expo CLI on Windows. You may encounter issues using cmd.exe.

Enabled experimental React Native Directory checks. Unset the EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK environment variable to disable this check.
✔ Check package.json for common issues
✔ Check Expo config for common issues
✔ Check native tooling versions
✔ Check if the project meets version requirements for submission to app stores
✔ Check for common project setup issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check npm/ yarn versions
✔ Check for issues with Metro config
✔ Validate packages against React Native Directory package metadata
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

As you can notice, I have a warning that I don't understand as I am already using powershell, i don't know if it can be an issue there because I never had this warning before.

I've tried all I could: installing expo again, eas, npm, uninstalling expo-dev-client etc... I don't know what provoked this because I had no problem before and now i am stuck on this since yesterday. The only thing i've done that could explain this could be: I have upgraded expo version and eas as new updates just arrived and I uploaded a picture in my asset folder for push notification icon as i was adding notifications to my project.

While building my app with this command: eas build --profile development --platform android

I have this error:

Running "expo doctor"
Enabled experimental React Native Directory checks. Unset the EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK environment variable to disable this check.
Running 15 checks on your project...
✔ Check package.json for common issues
✔ Check Expo config for common issues
✔ Check native tooling versions
✔ Check if the project meets version requirements for submission to app stores
✔ Check for common project setup issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check for issues with Metro config
✔ Validate packages against React Native Directory package metadata
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check npm/ yarn versions
✖ Check that packages match versions required by installed Expo SDK
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
Detailed check results:
sh: 1: expo: Permission denied
Advice: Use 'npx expo install --check' to review and upgrade your dependencies.
One or more checks failed, indicating possible issues with the project.
Command "expo doctor" failed.
npx -y expo-doctor exited with non-zero code: 1

Build failed
npx expo prebuild --no-install --platform android exited with non-zero code: 126

even though I don't have any problems when I do npx expo-doctor on my pc:

PS D:\projects\MYGRID\myGrid-react\MyGridApp> npx expo-doctor
WARNING: We recommend using PowerShell or Bash via WSL 2 for development with Expo CLI on Windows. You may encounter issues using cmd.exe.

Enabled experimental React Native Directory checks. Unset the EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK environment variable to disable this check.
✔ Check package.json for common issues
✔ Check Expo config for common issues
✔ Check native tooling versions
✔ Check if the project meets version requirements for submission to app stores
✔ Check for common project setup issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check npm/ yarn versions
✔ Check for issues with Metro config
✔ Validate packages against React Native Directory package metadata
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

As you can notice, I have a warning that I don't understand as I am already using powershell, i don't know if it can be an issue there because I never had this warning before.

I've tried all I could: installing expo again, eas, npm, uninstalling expo-dev-client etc... I don't know what provoked this because I had no problem before and now i am stuck on this since yesterday. The only thing i've done that could explain this could be: I have upgraded expo version and eas as new updates just arrived and I uploaded a picture in my asset folder for push notification icon as i was adding notifications to my project.

Share Improve this question asked Feb 6 at 13:33 theoduhtheoduh 211 bronze badge New contributor theoduh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Add a comment  | 

2 Answers 2

Reset to default 1

This may solve the issue for you: https://github.com/expo/eas-cli/issues/2882

I had a similar behaviour as you described with the build error but expo doctor working locally. I added the recommended "requireCommit": true to the cli object of the eas.json and, after the required commit, the build worked.

I had the same problem. Downgrading to [email protected] worked as a workaround. I didn't try adding recommended "requireCommit": true to the eas.json cli object as mentioned above.

发布评论

评论列表(0)

  1. 暂无评论