Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install react-native-ui-lib - Cannot read properties of null (reading 'children') #3485

Closed
3 of 7 tasks
iSued opened this issue Jan 17, 2025 · 13 comments
Closed
3 of 7 tasks
Labels
bug a bug in one of the components waiting-for-response

Comments

@iSued
Copy link

iSued commented Jan 17, 2025

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

  • Components
  • Demo
  • Docs
  • Typings

Steps to Reproduce

  1. Create a React Native project using version 0.76.6.
  2. 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

  • Android
  • iOS
  • Web
@iSued iSued added the bug a bug in one of the components label Jan 17, 2025
@iSued
Copy link
Author

iSued commented Jan 17, 2025

please don't tell me to npm install [email protected] --legacy-peer-deps

@aimz-yeah
Copy link

Similar issue here: #3363

If i delete package-lock.json I have to delete react-native-ui-lib from my package.json file, npm install everything and then npm install [email protected]. Can't install 7.35 lol.

@Bengejd
Copy link

Bengejd commented Jan 19, 2025

Similar issue here: #3363

If i delete package-lock.json I have to delete react-native-ui-lib from my package.json file, npm install everything and then npm 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?

@hellboy41785
Copy link

I am also facing same issue

@iSued
Copy link
Author

iSued commented Jan 20, 2025

@nitzanyiz

@janoslc
Copy link

janoslc commented Jan 20, 2025

Hey @iSued can you please share the relevant section from /Users/suedsinani/.npm/_logs/2025-01-17T17_34_52_054Z-debug-0.log? (It will be at the end of it)
I'm facing a similar issue, and suspecting that it's not react-native-ui-lib related.

@nitzanyiz
Copy link
Contributor

Hi @iSued , We're still trying to figure out what the problem is. For now seems like installing with yarn works.

@M-i-k-e-l
Copy link
Contributor

Hi all (@iSued @aimz-yeah @Bengejd @hellboy41785 @janoslc)

Please try now (same version).

@janoslc
Copy link

janoslc commented Jan 22, 2025

I'm still facing the same issue.

Here's my log file's content:

...
280 http cache https://registry.npmjs.org/react-native 12ms (cache hit)
281 silly packumentCache full:https://registry.npmjs.org/react-native set size:12882464 disposed:false
282 silly fetch manifest [email protected]
283 silly packumentCache full:https://registry.npmjs.org/react cache-miss
284 http cache https://registry.npmjs.org/react 6ms (cache hit)
285 silly packumentCache full:https://registry.npmjs.org/react set size:5362910 disposed:false
286 verbose stack TypeError: Cannot read properties of null (reading 'children')
286 verbose stack     at CanPlaceDep.checkCanPlaceCurrent (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/can-place-dep.js:253:35)
286 verbose stack     at CanPlaceDep.checkCanPlace (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/can-place-dep.js:157:27)
286 verbose stack     at new CanPlaceDep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/can-place-dep.js:114:26)
286 verbose stack     at new PlaceDep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:87:19)
286 verbose stack     at #buildDepStep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:920:18)
286 verbose stack     at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:181:7)
286 verbose stack     at async Promise.all (index 1)
286 verbose stack     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:131:5)
286 verbose stack     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5)
286 verbose stack     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
287 error Cannot read properties of null (reading 'children')
288 silly unfinished npm timer reify 1737543120478
289 silly unfinished npm timer reify:loadTrees 1737543120478
290 silly unfinished npm timer idealTree:buildDeps 1737543120708
291 silly unfinished npm timer idealTree:node_modules/uilib-native 1737543121368
292 verbose cwd /Users/janos/projects/leasecake-native-app
293 verbose os Darwin 24.1.0
294 verbose node v23.6.0
295 verbose npm  v10.9.2
296 verbose exit 1
297 verbose code 1
298 error A complete log of this run can be found in: /Users/[MY-USER]/.npm/_logs/2025-01-22T10_52_00_363Z-debug-0.log

Worth to mention that lately npm install failed too, and I removed node_modules + package-lock.json. It didn't resolve the problem, it still fails. Only with --legacy-peer-deps flag it passes. Can it be related to this?

@M-i-k-e-l
Copy link
Contributor

If you remove package-lock.json it should unlock our dependency and bring the new one, which should solve your issue.

@M-i-k-e-l
Copy link
Contributor

M-i-k-e-l commented Jan 22, 2025

It's worked for both @nitzanyiz and me with a clean install, lets wait for others to respond

@janoslc
Copy link

janoslc commented Jan 22, 2025

It works now, thank you @M-i-k-e-l !

@aimz-yeah
Copy link

It worked for me too! Great stuff, thanks @M-i-k-e-l we love you <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in one of the components waiting-for-response
Projects
None yet
Development

No branches or pull requests

7 participants