I have work on react native before and it was work fine
after some working on python and install some packages
I start got this error when trying to initialize new project using this command : react-native init
I have update react native to latest version and try to reinstall it again but still same error
react-native-cli: 2.0.1
react-native: 0.59.1
node v11.12.0
npm 6.7.0
Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?
👉 Click here if you want to take another look at the Bug Report issue template.
I am having the exact same issue !!
I also have this problem. React Native seem to be problems when they update new version. Since Flutter comes in so fast now, I think RN might be disappear soon. New developers are introduced to Flutter and currently RN developers also moving to flutter...
@temchannat I fixed by following commands:
react-native init awesomeApplication --version "0.58.6"
Hope this helps !!
@zsubzwary yes for version less than 59 is fine, but when you don't specify the version, it run into the problem hahaha....
@temchannat even specifying the version...it is not working for me
me too……
Also have this problem using Yarn on macOS.
After version error I have issue!!
C:\react\Task> react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
ERROR: JAVA_HOME is set to an invalid directory: C:\path\to\JavaSDK
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
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
Duplicate of https://github.com/facebook/react-native/issues/24108. Should be already fixed
i had same issue "Could not debug. The "path" argument must be of type string. Received type undefined"
resolved by removing
"outDir": "${workspaceRoot}/.vscode/.react"
and added
"cwd": "${workspaceRoot}"
in launch.json
code sample:
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"cwd": "${workspaceRoot}"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"sourceMaps": true,
"cwd": "${workspaceRoot}"
},
Most helpful comment
i had same issue "Could not debug. The "path" argument must be of type string. Received type undefined"
resolved by removing
"outDir": "${workspaceRoot}/.vscode/.react"
and added
"cwd": "${workspaceRoot}"
in launch.json
code sample:
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"cwd": "${workspaceRoot}"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"sourceMaps": true,
"cwd": "${workspaceRoot}"
},