react-native-builder-bob icon indicating copy to clipboard operation
react-native-builder-bob copied to clipboard

Bootstrapping new project created from create-react-native-library does not work

Open frankbolviken opened this issue 3 years ago • 3 comments

Environment

Nothing special, just issued the following command from terminal

npx create-react-native-library@latest react-native-components
cd react-native-components
yarn

Description

The script will fail with error:

....
✔ Wrote definition files to lib/typescript
$ yarn --cwd example pods
error Command "pods" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Whenever i try yarn example ios

✔ It looks like you're trying to use TypeScript but don't have the required dependencies installed. Would you like to install @types/react? … yes

✔ Installed @types/react@~17.0.21
It looks like you're trying to use TypeScript but don't have the required dependencies installed.

Please install @types/react by running:

yarn add --dev @types/react@~17.0.21

If you're not using TypeScript, please remove the TypeScript files from your project and delete the tsconfig.json.

It will present this error no matter if you installed the @types/react library.

frankbolviken avatar Oct 13 '22 13:10 frankbolviken

Can you try again with the latest version?

satya164 avatar Oct 13 '22 16:10 satya164

Can you try again with the latest version?

Yes, it is working now, thanks! Can you add background color white in example build in future?, because in example project start with black screen without result text.

Splicer97 avatar Oct 13 '22 20:10 Splicer97

Can you try again with the latest version?

How can I fix my current project with previous version?

Splicer97 avatar Oct 13 '22 20:10 Splicer97

How can I fix my current project with previous version?

You can generate a new project and copy over the files

satya164 avatar Oct 18 '22 20:10 satya164

@Splicer97

  1. update "scripts" section in package.json files in root and in example folder from generated new project.
  2. update Podfile from generated new project.
  3. Update metro.config.js
  4. Detele all *.lock files and Podfile.lock

Alexufo avatar Nov 16 '22 13:11 Alexufo