Closed Alex-Bond closed 4 years ago
Which your react native version is it?
My plugin in find react-native command in the PATH env. I'd like to see the result of
which react-native
Hey!
So, the RN version is 0.61.2.
When I'm outside of the project:
$ which react-native
react-native not found
Inside project:
$ which react-native
react-native not found
Inside project as well:
$ yarn react-native
yarn run v1.19.2
$ /Users/alex/CodingProjects/titanwinds/TitanWinds/node_modules/.bin/react-native
Usage: react-native [options] [command]
...rest of the help
Same but with npx:
$ npx react-native
Usage: react-native [options] [command]
Options:
--version Print CLI version
--verbose Increase logging verbosity
-h, --help output usage information
...rest of the help
Terminal:
$ which react-native
/Users/alex/CodingProjects/titanwinds/TitanWinds/node_modules/.bin/react-native
$ react-native
Usage: react-native [options] [command]
Options:
--version Print CLI version
--verbose Increase logging verbosity
-h, --help output usage information
...rest of the help
$ yarn react-native
yarn run v1.19.2
$ /Users/alex/CodingProjects/titanwinds/TitanWinds/node_modules/.bin/react-native
Usage: react-native [options] [command]
Options:
--version Print CLI version
--verbose Increase logging verbosity
-h, --help output usage information
...rest of the help
$ npx react-native
Usage: react-native [options] [command]
Options:
--version Print CLI version
--verbose Increase logging verbosity
-h, --help output usage information
...rest of the help
IDEA RN Console: Any command that requires react-native:
Unable to run the commandline:Cannot run program "react-native" (in directory "/Users/alex/CodingProjects/titanwinds/TitanWinds"): error=2, No such file or directory
Yarn, NPM and gradle commands work fine.
I am in the same situation with @Alex-Bond
i've found the reason, the latest RN 0.60+ no more relay on global rn cli. you can try npm install -g react-native-cli as a temporary fix, and i'll do a plugin update to compatible with both latest and old RN version.
Fixed, try this plugin jar first: https://github.com/beansoftapp/react-native-console/blob/2019.2/react-native-console.jar
@beansoftapp works perfectly! Thank you!
Hi!
Caught some weird bug - React Native Console: Unable to run the commandline:Cannot run program "react-native" (in directory "/Users/alex/IdeaProjects/someRNProject"): error=2, No such file or directory
It used to work fine, but at some point stopped working. Maybe it's better to move node_modules/.bin to config so you can run commands from there?
Calling react-native from terminal wors fine. NPM/YARN works fine in terminal and plugin as well.