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

ERR_INVALID_ARG_TYPE(name, 'string', value); ^ TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined at validateString (internal/validators.js:125:11) at Object.join (path.js:1147:7) #24108

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

Comments

@Steffi3rd
Copy link

I just run

$ react-native init AwesomeProject

Package are installed but I have an error

info Setting up new React Native app in /Users/xx/Sites/AwesomeProject
info Adding required dependencies
internal/validators.js:125
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:125:11)
    at Object.join (path.js:1147:7)
    at isProjectUsingYarn (/Users/xx/Sites/AwesomeProject/node_modules/@react-native-community/cli/build/tools/yarn.js:101:51)
    at shouldUseYarn (/Users/xx/Sites/AwesomeProject/node_modules/@react-native-community/cli/build/tools/PackageManager.js:36:39)
    at Object.install (/Users/xx/Sites/AwesomeProject/node_modules/@react-native-community/cli/build/tools/PackageManager.js:44:10)
    at generateProject (/Users/xx/Sites/AwesomeProject/node_modules/@react-native-community/cli/build/commands/init/init.js:111:18)
    at Object.init (/Users/xx/Sites/AwesomeProject/node_modules/@react-native-community/cli/build/commands/init/init.js:94:3)
    at run (/Users/xx/.config/yarn/global/node_modules/react-native-cli/index.js:302:7)
    at createProject (/Users/xx/.config/yarn/global/node_modules/react-native-cli/index.js:249:3)
    at init (/Users/xx/.config/yarn/global/node_modules/react-native-cli/index.js:200:5)
@Steffi3rd Steffi3rd changed the title info Adding required dependencies internal/validators.js:125 throw new ERR_INVALID_ARG_TYPE(name, 'string', value); ^ TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined at validateString (internal/validators.js:125:11) at Object.join (path.js:1147:7) ERR_INVALID_ARG_TYPE(name, 'string', value); ^ TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined at validateString (internal/validators.js:125:11) at Object.join (path.js:1147:7) Mar 22, 2019
@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.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Mar 22, 2019
@Steffi3rd
Copy link
Author

#24107

@Steffi3rd
Copy link
Author

#24103

@nomadbitcoin
Copy link

i am having the same problem

@layercomp
Copy link

I'm facing the same issue

@allain
Copy link

allain commented Mar 23, 2019

same problem happens with node 10 and 11 here.

Looks like it's probably related to @react-native-community/cli being updated 7 hours ago.

react-native-community/cli#260

If you're looking for a quick solution can edit a file in node modules: react-native-community/cli@0c00895 and re-run the command. It worked for me.

@turnrye
Copy link
Contributor

turnrye commented Mar 23, 2019

C'est un duplicata de #24103.

@FIyxian
Copy link

FIyxian commented Mar 23, 2019

metoo……

@wilbyang
Copy link

I have the same issue

@ridhoassuryadi
Copy link

its work on previous version, you can try

react-native init AwesomeProject --version "0.58.6"

@hbmmy1234
Copy link

I hava this problem too
info Setting up new React Native app in D:\ReactNative\MyApp
info Adding required dependencies
path.js:39
throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.join (path.js:432:7)
at isProjectUsingYarn (D:\ReactNative\MyApp\node_modules@react-native-community\cli\build\tools\yarn.js:101:51)
at shouldUseYarn (D:\ReactNative\MyApp\node_modules@react-native-community\cli\build\tools\PackageManager.js:36:39)
at Object.install (D:\ReactNative\MyApp\node_modules@react-native-community\cli\build\tools\PackageManager.js:44:10)
at generateProject (D:\ReactNative\MyApp\node_modules@react-native-community\cli\build\commands\init\init.js:111:18)
at Object.init (D:\ReactNative\MyApp\node_modules@react-native-community\cli\build\commands\init\init.js:94:3)
at run (C:\Users\user\AppData\Roaming\npm\node_modules\react-native-cli\index.js:302:7)
at createProject (C:\Users\user\AppData\Roaming\npm\node_modules\react-native-cli\index.js:249:3)
at init (C:\Users\user\AppData\Roaming\npm\node_modules\react-native-cli\index.js:200:5)

D:\ReactNative>node -v
v10.15.0

D:\ReactNative>npm -v
6.4.1

@thymikee
Copy link
Contributor

Duplicate of #24103 (already fixed)

@XiaoJianPeng
Copy link

I have the same issue

@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