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

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined #24107

Closed
atallah-salah opened this issue Mar 22, 2019 · 11 comments
Labels
Bug Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@atallah-salah
Copy link

atallah-salah commented Mar 22, 2019

🐛 Bug Report

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

Captureerror

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

@react-native-bot
Copy link
Collaborator

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.

@zsubzwary
Copy link

I am having the exact same issue !!

@temchannat
Copy link

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...

@zsubzwary
Copy link

@temchannat I fixed by following commands:
react-native init awesomeApplication --version "0.58.6"

Hope this helps !!

😇

@temchannat
Copy link

@zsubzwary yes for version less than 59 is fine, but when you don't specify the version, it run into the problem hahaha....

@zuby64
Copy link

zuby64 commented Mar 23, 2019

@temchannat even specifying the version...it is not working for me

@FIyxian
Copy link

FIyxian commented Mar 23, 2019

me too……

@duncannah
Copy link

Also have this problem using Yarn on macOS.

@AGPatel
Copy link

AGPatel commented Mar 23, 2019

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

@thymikee
Copy link
Contributor

thymikee commented Mar 23, 2019

Duplicate of #24108. Should be already fixed

@sai905905
Copy link

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}"
},

@facebook facebook locked as resolved and limited conversation to collaborators Mar 23, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

10 participants