Comments (14)
try remove node_modules, reinstall and mrousavy/react-native-vision-camera#1489 (comment)
from react-native-mmkv.
@deepanshu-ample @Kavahardik
Yes, The issue was fixed to me.
What i did is,
Actually I use nvm to manage my node,
Earlier I am using the node version => v16.20.2
Now I had installed latest node lts version i.e v20.10.0
After pointing to node version => v20.10.0 - I am not seeing the above prepareBoost issue
our app runs successfully
from react-native-mmkv.
@gangadharuseline You can download boost_1_76_0.tar.gz
file from here https://source.ipfire.org/source-2.x/
In your case you can download it via this link: https://source.ipfire.org/source-2.x/boost_1_76_0.tar.gz
then just copy it to App/node_modules/react-native-mmkv/android/build/downloads/boost_1_76_0.tar.gz
and build your app.
Note: you need to do this every time you run yarn
or npm
. I usually do this since since it downloads this file every time and it is very slow to download.
from react-native-mmkv.
The problem that you're facing is related to the general problem in the React Native Community regarding the broken download url from JFrog.
The React Native team is already working on a solution for it. You can follow the complete progress in this issue.
A temporary fix that worked on my build have been these steps:
- Install
patch-package
npm install --save-dev patch-package postinstall-postinstall
- Modify
build.gradle
You can find this file locally on your machine here: node_modules/react-native-mmkv/android/build.gradle
Change this line:
task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
def transformedVersion = BOOST_VERSION.replace("_", ".")
// change this line
def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
// to this
def srcUrl = "https://archives.boost.io/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
if (REACT_NATIVE_VERSION < 69) {
srcUrl = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${transformedVersion}-0/boost_${BOOST_VERSION}.tar.gz"
}
src(srcUrl)
onlyIfNewer(true)
overwrite(false)
dest(boost_file)
}
- Create patch
You need to run npx patch-package react-native-mmkv
to create the patch which will be applied. This will generate a patch file in the patches/
folder in your project.
- Add
postinstall
script topackage.json
You need to app the following script into your package.json
"scripts": {
"postinstall": "patch-package"
}
Afterwards, you can commit all files. This should fix your broken build. These changes will be applied automacially in your CI/ CD pipeline as well. There's no need to change this on every commit or push.
The steps are inspired by this post
from react-native-mmkv.
Have you been able to resolve this??
Execution failed for task ':react-native-mmkv:prepareBoost'.
> Could not read /.../App/node_modules/react-native-mmkv/android/build/downloads/boost_1_76_0.tar.gz.
> Not in GZIP format
from react-native-mmkv.
Execution failed for task ':react-native-mmkv:prepareBoost'.
Could not read /Users/peer/Documents/V3.1/Dipon/DiponMerchant/node_modules/react-native-mmkv/android/build/downloads/boost_1_76_0.tar.gz.
Not in GZIP format
Facing same issue.
from react-native-mmkv.
Facing same issue :
"react": "18.1.0", "react-native": "0.70.6", "react-native-mmkv": "2.5.1",
node version: v20.6.1
`* What went wrong:
Execution failed for task ':react-native-mmkv:prepareBoost'.
Could not read /Project-path/node_modules/react-native-mmkv/android/build/downloads/boost_1_76_0.tar.gz.
Not in GZIP format`
Getting same error in react-native-reanimated
from react-native-mmkv.
@deepanshu-ample @Kavahardik
Yes, The issue was fixed to me.
What i did is, Actually I use nvm to manage my node, Earlier I am using the node version => v16.20.2 Now I had installed latest node lts version i.e v20.10.0 After pointing to node version => v20.10.0 - I am not seeing the above prepareBoost issue our app runs successfully
Updating node version to v20.10.0 run successfully โ ๐
from react-native-mmkv.
For developers using older versions of Realm (realm/realm-js#5136), consider utilizing Node version v18.19.0.
from react-native-mmkv.
See similar software-mansion/react-native-reanimated#5542
Raised boostorg/boost#849
from react-native-mmkv.
@deepanshu-ample @Kavahardik
Yes, The issue was fixed to me.
What i did is, Actually I use nvm to manage my node, Earlier I am using the node version => v16.20.2 Now I had installed latest node lts version i.e v20.10.0 After pointing to node version => v20.10.0 - I am not seeing the above prepareBoost issue our app runs successfullyUpdating node version to v20.10.0 run successfully โ ๐
We are facing the same issue . In which file did u add the node version
from react-native-mmkv.
patch-package
patch
diff --git a/node_modules/react-native-mmkv/android/build.gradle b/node_modules/react-native-mmkv/android/build.gradle
index 13eae76..bc8dc83 100644
--- a/node_modules/react-native-mmkv/android/build.gradle
+++ b/node_modules/react-native-mmkv/android/build.gradle
@@ -204,7 +204,7 @@ task createNativeDepsDirectories {
task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
def transformedVersion = BOOST_VERSION.replace("_", ".")
- def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
+ def srcUrl = "https://archives.boost.io/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
if (REACT_NATIVE_VERSION < 69) {
srcUrl = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${transformedVersion}-0/boost_${BOOST_VERSION}.tar.gz"
}
from react-native-mmkv.
Instead of creating patches as comments, could you maybe create a PR so I can merge this upstream? Thanks
from react-native-mmkv.
the latest MMKV version (2.11) does not have this issue.
from react-native-mmkv.
Related Issues (20)
- mmkv๊ด๋ จ ๋ก๊ทธ ๋ฐ์ ํด๊ฒฐ
- iOS crash: malloc: *** error for object 0x282611260: pointer being freed was not allocated EXC_CRASH (SIGABRT)
- Crash reports after switching to use AppGroups due to 0xdead10cc HOT 2
- Cannot run in react-native 0.73.x HOT 1
- use expo go ,start with this error: CommandError: No development build (com.anonymous.***) for this project is installed. Please make and install a development build on the device first. HOT 3
- Unable to resolve module ./createMMKV.mock HOT 1
- Apple Privacy Manifest HOT 6
- Unable to make react-native-mmkv work with firebase auth persistence HOT 2
- duplicate symbols when used with react-native-quick-crypto HOT 1
- Storage breaks when calling storage.clearStore() on empty storage HOT 1
- `getString` fails on reload after calling `delete` with `encyptionKey` set in config HOT 9
- Crashing on bundle reload in beta version HOT 1
- Bug on RN 0.74 HOT 10
- How to Implement iCloud Sync to Keep Reinstalled Apps to Recover Data๏ผ HOT 3
- Building for 'iOS-simulator', but linking in dylib (/opt/local/lib/libz.1.3.1.dylib) built for 'macOS' HOT 2
- After defining the path for the MMKV instance, an empty 'MMKV' directory is still generated under $(Documents) HOT 3
- Expo managment. HOT 3
- Storage data not updating to next scene HOT 2
- Beta 5 Android build error cannot find symbol HOT 9
- > Task :app:mergeDebugNativeLibs FAILED
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-mmkv.