Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateProcess error=2, The system cannot find the file specified #25488

Closed
tmtung144 opened this issue Jul 4, 2019 · 10 comments
Closed

CreateProcess error=2, The system cannot find the file specified #25488

tmtung144 opened this issue Jul 4, 2019 · 10 comments
Labels
Bug 💻CLI Resolution: Locked This issue was locked by the bot.

Comments

@tmtung144
Copy link

$ react-native run-android
info Starting JS server...
info Installing the app...
:ReactNative:Cannot run program "./node_modules/.bin/react-native" (in directory "C:\Users\manht\Desktop\santimviec\android\.."): CreateProcess error=2, The system cannot find the file specified
:ReactNative:Automatic import of native modules failed.

> Configure project :app
:ReactNative:Cannot run program "./node_modules/.bin/react-native" (in directory "C:\Users\manht\Desktop\santimviec\android\.."): CreateProcess error=2, The system cannot find the file specified
:ReactNative:Automatic import of native modules failed.

> Task :app:installDebug
03:13:53 V/ddms: execute: running am get-config
03:13:53 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
03:13:53 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Pixel_2_API_28(AVD) - 9' for app:debug
03:13:53 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
03:13:53 D/Device: Uploading file onto device 'emulator-5554'
03:13:53 D/ddms: Reading file permision of C:\Users\manht\Desktop\santimviec\android\app\build\outputs\apk\debug\app-debug.apk as: rwx------
03:13:54 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
03:13:54 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
03:13:54 V/ddms: execute: returning
03:13:54 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
03:13:54 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
03:13:54 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 2s
27 actionable tasks: 2 executed, 25 up-to-date
info Connecting to the development server...
info Starting the app on "emulator-5554"...
Starting: Intent { cmp=com.santimviec/.MainActivity }

React Native version:

System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
Memory: 2.44 GB / 7.95 GB
Binaries:
Node: 12.5.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5522156

Steps To Reproduce

  1. react-native init ABC
  2. react-native run-android

Describe what you expected to happen:
Build successful apps in android emulator or real device

!!! I have searched for more than half a day for this problem but I have not resolved it, I tried to go back to version 0.59.9 to install and use, no problem occurred.

@tmtung144 tmtung144 added the Bug label Jul 4, 2019
@gdoudeng
Copy link

gdoudeng commented Jul 4, 2019

me too!!!

@haddad-yacine
Copy link

haddad-yacine commented Jul 4, 2019

Same problem with:
Node: 12.4.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
react-native-cli: 2.0.1
react-native: 0.60.0

@Sine99
Copy link

Sine99 commented Jul 4, 2019

Same problem here .... this is probably with the new version of react-native-0.60.0

info Starting JS server...
info Installing the app...

:ReactNative:Cannot run program "./node_modules/.bin/react-native" (in directory "E:\ReactNative\Examples\Ex_animation\android.."): CreateProcess error=2, The system cannot find the file specified
:ReactNative:Automatic import of native modules failed.

Configure project :app
:ReactNative:Cannot run program "./node_modules/.bin/react-native" (in directory "E:\ReactNative\Examples\Ex_animation\android.."): CreateProcess error=2, The system cannot find the file specified
:ReactNative:Automatic import of native modules failed.

FAILURE: Build failed with an exception.

@vishesh3006
Copy link

vishesh3006 commented Jul 4, 2019

Same problem. Even after using version 0.59.9 the "ERROR: Build failed with an exception" is being displayed.

Task :app:installDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:installDebug'.

com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.manager signatures do not match the previously installed version; ignoring!

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s
26 actionable tasks: 1 executed, 25 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

@kelset
Copy link
Contributor

kelset commented Jul 4, 2019

👋 there, can you check that you are using the cli version 2.0.2? There was an issue with windows that was related to that -> react-native-community/cli#464

to make sure you will install it, you should check in your yarn.lock which version got installed - it should say something like

"@react-native-community/cli@^2.0.1":
  version "2.0.2"

if instead the version is 2.0.1, you should remove that portion from the yarn lock and your yarn again.

If it still happens, please open a dedicated issue in that repo -> https://github.com/react-native-community/cli

@kelset kelset closed this as completed Jul 4, 2019
@kelset kelset added the 💻CLI label Jul 4, 2019
@vishesh3006
Copy link

👋 there, can you check that you are using the cli version 2.0.2? There was an issue with windows that was related to that -> react-native-community/cli#464

to make sure you will install it, you should check in your yarn.lock which version got installed - it should say something like

"@react-native-community/cli@^2.0.1":
  version "2.0.2"

if instead the version is 2.0.1, you should remove that portion from the yarn lock and your yarn again.

If it still happens, please open a dedicated issue in that repo -> https://github.com/react-native-community/cli

still not working

@victorwpbastos
Copy link

Why this issue has been closed? The error still persists.

@kelset
Copy link
Contributor

kelset commented Jul 4, 2019

As I mentioned, this is an issue with the CLI and since it's in a dedicated repo now, the issue should be opened there.

@haddad-yacine
Copy link

👋 there, can you check that you are using the cli version 2.0.2? There was an issue with windows that was related to that -> react-native-community/cli#464

to make sure you will install it, you should check in your yarn.lock which version got installed - it should say something like

"@react-native-community/cli@^2.0.1":
  version "2.0.2"

if instead the version is 2.0.1, you should remove that portion from the yarn lock and your yarn again.

If it still happens, please open a dedicated issue in that repo -> https://github.com/react-native-community/cli

Still the same probleme

@debaosuidecl
Copy link

this is so disheartening. I still have the same problem..
I hope a solution comes out soon

@kelset kelset pinned this issue Feb 10, 2020
@kelset kelset unpinned this issue Feb 10, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Feb 10, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug 💻CLI Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants