Cannot install react-native-ui-lib - Cannot read properties of null (reading 'children')
Title: Cannot install react-native-ui-lib - Cannot read properties of null (reading 'children')
Description
When attempting to install [email protected] in a React Native project, the installation fails with the following error:
This occurs despite ensuring the compatibility of the library version with the project setup.
Related to
- [x] Components
- [ ] Demo
- [ ] Docs
- [x] Typings
Steps to Reproduce
- Create a React Native project using version
0.76.6. - Attempt to install
[email protected]using the following command:npm install [email protected]
Expected behavior
Install the lib without conflicts or showing expected peer deps
Actual behavior
npm i [email protected]
npm error Cannot read properties of null (reading 'children')
npm error A complete log of this run can be found in: /Users/suedsinani/.npm/_logs/2025-01-17T17_34_52_054Z-debug-0.log
More Info
Code snippet
{
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest",
"artifactregistry-login": "npx google-artifactregistry-auth",
"postinstall": "react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios"
},
"dependencies": {
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-brands-svg-icons": "^6.4.2",
"@fortawesome/free-regular-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-native-fontawesome": "^0.3.0",
"@gorhom/bottom-sheet": "^4",
"@hookform/resolvers": "^3.3.2",
"@notabene/javascript-sdk": "^1.32.0",
"@react-native-community/blur": "^4.4.1",
"@react-native-community/hooks": "^3.0.0",
"@react-navigation/drawer": "^6.6.3",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@reduxjs/toolkit": "^1.9.5",
"@shopify/react-native-skia": "1.5.0",
"expo": "~52.0.25",
"expo-asset": "~11.0.1",
"expo-clipboard": "~7.0.1",
"expo-constants": "~17.0.3",
"expo-file-system": "~18.0.6",
"expo-image-picker": "~16.0.4",
"expo-modules-core": "~2.1.2",
"expo-sharing": "~13.0.1",
"expo-splash-screen": "~0.29.20",
"expo-status-bar": "~2.0.1",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"react": "18.3.1",
"react-hook-form": "^7.45.4",
"react-native": "0.76.6",
"react-native-biometrics": "^3.0.1",
"react-native-blob-util": "^0.19.6",
"react-native-charts-wrapper": "^0.6.0",
"react-native-gesture-handler": "~2.20.2",
"react-native-inappbrowser-reborn": "^3.7.0",
"react-native-linear-gradient": "^2.8.3",
"react-native-mmkv": "^3.2.0",
"react-native-pdf": "^6.7.4",
"react-native-pie-chart": "^3.0.2",
"react-native-progress": "^5.0.1",
"react-native-qrcode-svg": "^6.2.0",
"react-native-reanimated": "^3.16.6",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.4.0",
"react-native-select-dropdown": "^3.4.0",
"react-native-share": "^10.2.1",
"react-native-shimmer-placeholder": "^2.0.9",
"react-native-splash-screen": "^3.3.0",
"react-native-svg": "15.8.0",
"react-native-svg-transformer": "^1.3.0",
"react-native-ui-lib": "^7.19.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-uuid": "^2.0.2",
"react-native-version-check": "^3.4.7",
"react-native-view-shot": "~4.0.3",
"react-native-vision-camera": "^4.6.3",
"react-native-web": "^0.19.9",
"react-native-webview": "13.12.5",
"react-native-worklets-core": "^1.5.0",
"react-redux": "^8.1.2",
"string-hash-64": "^1.0.3",
"victory-native": "^36.8.1",
"yup": "^1.3.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.76.5",
"@react-native/eslint-config": "0.76.5",
"@react-native/metro-config": "^0.76.6",
"@react-native/typescript-config": "0.76.5",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"babel-plugin-module-resolver": "^5.0.2",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-native-dotenv": "^3.4.9",
"react-test-renderer": "18.3.1",
"typescript": "^5.3.3"
},
"engines": {
"node": ">=18"
}
}
Environment
• Node.js: v22.11.0
• npm: 10.9.0
• OS: macOS Ventura
• React Native: 0.76.6
- React Native version: 0.76.6
- React Native UI Lib version: 7.35.0
Affected platforms
- [x] Android
- [ ] iOS
- [ ] Web
please don't tell me to npm install [email protected] --legacy-peer-deps
Similar issue here: #3363
If i delete package-lock.json I have to delete
react-native-ui-libfrom my package.json file,npm installeverything and thennpm install [email protected]. Can't install 7.35 lol.
Same issue here. I thought I broke my node installation or something, and went through and re-installed my recently updated dependencies one by one until I found out it was [email protected]. Version 7.34.0 works just fine however.
@ethanshar any chance we can get someone to look at this?
I am also facing same issue
@nitzanyiz
Hi @iSued , We're still trying to figure out what the problem is. For now seems like installing with yarn works.
Hi all (@iSued @aimz-yeah @Bengejd @hellboy41785 @janoslc)
Please try now (same version).
If you remove package-lock.json it should unlock our dependency and bring the new one, which should solve your issue.
It's worked for both @nitzanyiz and me with a clean install, lets wait for others to respond