Open ggunti opened 4 years ago
Assuming that you are on a macOS host, you do have to install the pod
tool before you can generate with an example app or generate any React Native app in general. I think the React Native CLI will offer to install pod
for you but I like to install the tools myself. I am pretty sure I used Homebrew to install pod
, which is my recommended solution.
I do think the error message should explain that the pod
tool is missing and needs to be installed, already added the bug label. Thanks.
I am having the same problem on macOS and I do have pod
version 1.9.1
installed.
I am having the same problem on macOS and I do have
pod
version1.9.1
installed.
That does not sound right to me. Please do pod --version
from your command line, show the results of pod --version
, and show all relevant output for the error.
FYI I am at pod 1.8.4, will upgrade and try again when I get a chance.
pod --version
is 1.9.1
✖ Downloading template
error Error: Command failed: yarn add react-native@react-native@latest
error Couldn't find any versions for "react-native" that matches "react-native@latest"
yarn add v1.22.4
info No lockfile found.
And this
check for valid pod version in ./react-native-my-fancy-library/example/ios
pod --version failure, aborting with broken example app
Error while creating library module react-native-my-fancy-library
Error: Command failed with ENOENT: pod --version
spawnSync pod ENOENT
at Object.spawnSync (internal/child_process.js:1041:20)
at Object.spawnSync (child_process.js:616:24)
at Function.module.exports.sync (/Users/sajjadashraf/.nvm/versions/node/v12.16.2/lib/node_modules/create-react-native-module/node_modules/execa/index.js:169:25)
at module.exports.commandSync (/Users/sajjadashraf/.nvm/versions/node/v12.16.2/lib/node_modules/create-react-native-module/node_modules/execa/index.js:227:15)
at /Users/sajjadashraf/.nvm/versions/node/v12.16.2/lib/node_modules/create-react-native-module/lib/lib.js:278:17
at new Promise (<anonymous>)
@sajjad26 it looks to me like you are hitting issue #312 before hitting the issue with pod
, and I am now suspecting that the ENOENT error is because of the missing template.
For me, use --example-react-native-template react-native@0.62
, everything works
Hello! If I run
create-react-native-module --generate-example MultiKeyboard
for example, I get the following error regardingpod --version
:In case that I do not use
--generate-example
, everything works, but I really need also an example project.Thank you!