cli icon indicating copy to clipboard operation
cli copied to clipboard

CreateProcess error=193, %1 is not a valid Win32 application

Open OguzhanKazak opened this issue 6 years ago • 26 comments

System: OS: Windows 10 10.0.17763 CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz Memory: 6.53 GB / 15.91 GB Binaries: Node: 10.16.3 - C:\Program Files\nodejs\node.EXE npm: 6.10.3 - C:\Users\oguzhan.kazak\AppData\Roaming\npm\npm.CMD SDKs: Android SDK: API Levels: 23, 25, 28 Build Tools: 28.0.3, 29.0.2 System Images: android-23 | Google APIs Intel x86 Atom_64 IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548 npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5

FAILURE: Build failed with an exception.

  • Where: Script 'C:\Projects\TerminalMobil\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 154

  • What went wrong: A problem occurred evaluating script.

Cannot run program "C:\Projects\TerminalMobil\node_modules@react-native-community\cli\build\bin.js": CreateProcess error=193, %1 is not a valid Win32 application

react-native run-android throws this error.

OguzhanKazak avatar Feb 07 '20 08:02 OguzhanKazak

Do you have a repro maybe? I haven't seen an error like this here yet. Maybe your node_modules are corrupted? Please try to remove them and yarn install again (I suggest using yarn, because npm produces undeterministic node_modules).

thymikee avatar Feb 07 '20 08:02 thymikee

I also have this error, it occured quite recently after some packages like camera were added. package-lock and node_modules removed and installed again, no change. Tried the same (removal of node_modules and all lock files) with yarn, same thing.

draggie avatar Feb 10 '20 18:02 draggie

I am facing the same issue. "react-native": "^0.61.5", "@react-native-community/cli": "^3.0.5-alpha.1", "@react-native-community/cli-platform-android": "^3.0.5-alpha.1",

mjaydeep01 avatar Feb 11 '20 10:02 mjaydeep01

this solution may be helpful, but it didn't work out for me: https://stackoverflow.com/questions/58952564/error-unable-to-determine-the-current-character-it-is-not-a-string-number-ar

OguzhanKazak avatar Feb 11 '20 11:02 OguzhanKazak

i have the same issue @OguzhanKazak . anyone solve this?

Waqas-Jani avatar Feb 13 '20 16:02 Waqas-Jani

I solved it with replacing android folder, package.json and package-lock.json files with working ones. Problem is probably about @react-native-community/cli-platform-android

OguzhanKazak avatar Feb 13 '20 17:02 OguzhanKazak

i don't have package-lock.json file

Waqas-Jani avatar Feb 13 '20 17:02 Waqas-Jani

@OguzhanKazak Can you explain a bit more? What do you mean by "working ones"?

ngregrichardson avatar Feb 13 '20 18:02 ngregrichardson

We are working on that project with my friend. So i copied and pasted android + package.json's from him. I don't really know how did it solved my problem sorry :/

OguzhanKazak avatar Feb 13 '20 19:02 OguzhanKazak

I'm having the same issue.

amduffy19 avatar Feb 13 '20 20:02 amduffy19

same problem here in a fresh react native app

sclavijo93 avatar Feb 13 '20 20:02 sclavijo93

I think the lasted version (0.61.0) is the problem I created a new react native app using 0.60.0 and I tested in the emulator without errors.

react-native init AwesomeProject --version 0.60.0

ManoloAlvarezForo avatar Feb 13 '20 21:02 ManoloAlvarezForo

This sounds like a serious problem, we're going to look into it first thing in the morning.

grabbou avatar Feb 13 '20 21:02 grabbou

Problem started again 5 hours ago.

JeanPSF avatar Feb 13 '20 21:02 JeanPSF

I think the lasted version (0.61.0) is the problem I created a new react native app using 0.60.0 and I tested in the emulator without errors.

react-native init AwesomeProject --version 0.60.0

This made the build succeed, but when the app opens on my connected Android phone I get:

console error: React Native version mismatch. 

Javascript version: 0.61.5
Native version: 0.60.0

EDIT: Fixed the React Native version mismatch error by closing all terminals, deleting old project and recreating.

aldrichdev avatar Feb 13 '20 22:02 aldrichdev

Im having the same problem and dont know how to fix it. And my app was running fine 4 hours ago, out of the blue it just stops working and gives me this error. Cannot run program "C:\Users\NikhilBatta\Desktop\throwaway\wellifynative\node_modules@react-native-community\cli\build\bin.js": CreateProcess error=193, %1 is not a valid Win32 application

nikhilbatta avatar Feb 14 '20 00:02 nikhilbatta

Hi @nikhilbatta , check this https://github.com/react-native-community/cli/issues/965#issuecomment-586011638

sclavijo93 avatar Feb 14 '20 01:02 sclavijo93

@sclavijo93 I tried this just now, and im still getting the same error.

nikhilbatta avatar Feb 14 '20 01:02 nikhilbatta

@sclavijo93 thanks, that worked!

amduffy19 avatar Feb 14 '20 01:02 amduffy19

However I'm now getting another error from the same library, Error: ENOENT: no such file or directory, open 'app\build\intermediates\merged_manifests\debug\AndroidManifest.xml'. Seems to be an issue with 3.1.1: https://stackoverflow.com/questions/60218063/no-such-file-or-directory-open-app-build-intermediates-merged-manifests-debug

amduffy19 avatar Feb 14 '20 01:02 amduffy19