Plugin [id: 'com.facebook.react.codegen'] was not found in any of the following sources:
Capture screen error
I am build react native from source (follow by this step : https://github.com/facebook/react-native/wiki/Building-from-source).
I found this Error. How can i fix it.
I ran into the same problem. Finally I give up using master. I just use the last release version 0.63 which does not use codegen, and it works. One more thing that I encountered but not shown on document is the hermes/DebuggerAPI.h import issue. The solution is to copy all files under node_modules/hermes-engine/android/include/hermes to node_modules/react-native/ReactCommon/hermes.
I think right now, it is better to build directly in React Native repo, rather than build in your app's repo as a dependency. Build react native, and then push the whole repo with artifacts to GitHub. Use GitHub repo's URL to install your custom react native.
Here is what I have done to build patched RN (mostly just following the wiki):
git clone https://github.com/facebook/react-native
cd react-native
git checkout v0.64.1 # or any other release
# now make changes to the code
# build android artifacts
docker run --rm --name rn-build -v $PWD:/pwd -w /pwd reactnativecommunity/react-native-android /bin/sh -c "./gradlew installArchives --no-daemon"
Note: if the gradle daemon unexpectedly disappears, try minimize the max ram usage in the root gradle.properties:
org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
and check ./gradlew is invoked with --no-daemon; this may help a bit.
After the build succeeds, include build artifacts android in the git:
git add android --force
git commit -m 'Release for some patches'
git checkout -b release-fix-something
git remote set-url origin https://github.com/myusername/react-native
git push origin release-fix-something:master
In your app's repo, install react-native by your fork:
yarn add https://github.com/myusername/react-native.git
Related
first time Mac user trying to start a new react-native application. After doing this:
npx react-native init project_adji --template react-native-template-typescript
it fails with the following message:
✔ Downloading template
✔ Copying template
✔ Processing template
✔ Installing Bundler
✖ Installing CocoaPods dependencies (this may take a few minutes)
error warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
I updated the ruby via rbenv to the required version to reach this point (ruby 2.7.5). I couldn't find the exact issue with my setup.
Any tips?
I had exact the same issue here. After some research, I solved by following these steps:
gem uninstall cocoapods
sudo xcodebuild -license accept
Then created a test project to see where if everything works fine by following:
npx react-native init tempProject --skip-install
cd tempProject
yarn install
cd ios
bundle install
bundle exec pod install
In order to try and make App Center work with my monorepo React Native app, I am trying to find a way to insert a few bash scripts between the automated git clone and npm install called by App Center.
Indeed, App Center automatically git clone the linked project and then automatically runs npm install as soon as the cloning is done.
There is no native post-clone hook, I haven't been able to make that package work (and I don't even know if it could work since the git clone command would be called from a blank environment) and npm script preinstall doesn't seem to work as it should since npm 7.
Does anyone know of a way to achieve that?
I finally found a solution by myself: App Center actually comes with built-in hooks that allows to do exactly what I wanted to do: https://learn.microsoft.com/en-us/appcenter/build/custom/scripts/
Just add a appcenter-post-clone.sh at the root of your React Native app (or at the same level than your .xcodeproj or your build.gradle and add any bash script in there. It will be run right after the git clone by App Center and before the automatic npm install.
I have started using Vuetify to add ui-components and use pre-defined layouts. The problem is that I have to look into online-docs every now and then, and requires me to be connected to internet perpetually.
Is there a way to get offline docs for Vuetify? Like an html built with doxygen/javadocs, or a CHM? PDF? LaTEX? Anything really helps.
Update
git clone https://github.com/vuetifyjs/vuetifyjs.com.git has become a private project. The docs are now in the packages/docs/ directory. Instructions have been updated.
You can download the project from the vuetifyjs site repo, install and run locally.
git repo: https://github.com/vuetifyjs/vuetify
The instructions (for vue-cli-2 based project):
cd /tmp/
git clone https://github.com/vuetifyjs/vuetify.git
cd vuetify/packages/docs
yarn
# option 1 - build and serve
yarn build
yarn start
# option 2 - run dev instance
yarn dev
See the docs on how to run the docs.
git clone https://github.com/vuetifyjs/vuetify.git
cd vuetify
yarn
yarn build
yarn dev docs
Then head over to http://localhost:8095/en/getting-started/quick-start
git clone https://github.com/vuetifyjs/vuetify.git
yarn
yarn build
yarn start
http://localhost:8095
download zip from https://github.com/vuetifyjs/vuetify
extract it to any place like i put it in d:\xampp\htdcos\vuetify-master
than open command prompt (cmd) and type this path d:\xampp\htdcos\vuetify-master
run this command yarn here D:\xampp\htdocs\vuetify-master>yarn
than run yarn build here D:\xampp\htdocs\vuetify-master>yarn build
than yarn start here D:\xampp\htdocs\vuetify-master>yarn start
it will start vuetify local docs at 0.0.0.0:8095
now open browser and type http://localhost:8095 and enjoy
node module is required
also install yarn from https://yarnpkg.com/lang/en/docs/install/#windows-stable before running yarn commands and make sure check yarn version in cmd via yarn -v
The Vuetify website allows you to view it offline there by typing its website and pressing enter when not connected to the internet. It works and I do that all the time.
I'm testing React Native 0.56.0-rc.2 on Mac OS Mojave and Xcode 10.
Running:
react-native init TestProject --version="0.56.0-rc.2"
cd TestProject
npm run start
react-native run-ios
Which generated some long errors.
Entering Xcode gave me a failure on missing config.h for glog, which I found could be built manually:
cd ./node_modules/react-native/third-party/glog-0.3.4
./configure && make && make install
Which passed that stage, but got me on yet another issue
(...)/node_modules/react-native/third-party/glog-0.3.4/src/glog/logging.h:85:10:
'gflags/gflags.h' file not found
I can't find anything related to RN and this on Google or Stack Overflow, only references to other packages and instructions to install those on a Debian-based system.
Is this a known issue?
Running this from the project directory fixed it for me:
cd ./node_modules/react-native/third-party/glog-0.3.4 && ../../scripts/ios-configure-glog.sh
This manually triggers the config script
A simple and quick resolution.
In Xcode, go to File->Project/Workspace settings.
Change the build system to Legacy Build system.
This is the resolution from Wesley's link. Saw something the other day about posting the direct answer and trying to avoid linking because links / websites can change. I was going to leave this as a comment, but don't have enough rep.
Update
It is a known issue, tracked here:
https://github.com/facebook/react-native/issues/19774
I resolved it by running following steps
In the root of the project, run npm install or yarn - install packages
cd node_modules/react-native - go to node modules directory
scripts/ios-install-third-party.sh - install # node_modules/react-native/third-party
cd third-party - go to newly created third party directory
cd glog-0.3.x - ls -la to find your directory version number or just use tab to auto-complete)
./configure - run setup
cd ../../../../ - change back to your project directory
react-native run-ios or react-native run-android - deploy
If any of these solution does not work, please check your project path. Project path and/or directory names should not contain any
space in its name or you can create project on Desktop or in Documents
directory.
Because of invalid name in project path, React Native project unable to link / add glob header files inside project / workspace.
I ran across realm when researching options for an embedded database to use for my first react-native app.
Following the steps documented here:
https://realm.io/docs/react-native/latest/#examples
I entered the following commands:
git clone https://github.com/realm/realm-js.git
cd realm-js/examples/ReactExample
npm install
When I open ReactExample.xcodeproj and attempt to build:
clang: error: no such file or directory: '/Users/edward3/Documents/projects/react-native/realm/realm-js/vendor/GCDWebServer/GCDWebServer/Core/GCDWebServerRequest.m'
clang: error: no input files
What am I missing?
Never mind, I was missing git submodule update.
git clone https://github.com/realm/realm-js.git
git submodule update --init --recursive
cd realm-js/examples/ReactExample
npm install
I am excited about learning to use realm. The realm example, at first glance, seems simple to learn compared to react-native sqlite examples.
https://realm.io/news/introducing-realm-react-native/