reactwg / react-native-releases

React Native Releases Working Group
334 stars 6 forks source link

NodePath has been removed so is read-only. in 73.6 #207

Closed CCB-cerivera closed 2 months ago

CCB-cerivera commented 2 months ago

Old Version

0.72.6

New Version

0.73.6

Description

[\node_modules\react-native\Libraries\Components\TextInput\RCTInputAccessoryViewNativeComponent.js: NodePath has been removed so is read-only.](error: node_modules\react-native\Libraries\Components\TextInput\RCTInputAccessoryViewNativeComponent.js: C:\Users\test\Documents\test2\node_modules\react-native\Libraries\Components\TextInput\RCTInputAccessoryViewNativeComponent.js: NodePath has been removed so is read-only.)

Steps to reproduce

  1. Run the updated app on iOS simulator
  2. See crash

Add package.json

{ "main": "index.js", "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "web": "expo start --web", "start": "react-native start", "eject": "expo eject", "test": "jest", "postinstall": "patch-package" }, "dependencies": { "@babel/traverse": "^7.24.1", "@expo/config-plugins": "~7.8.4", "@facephi/sdk-core-react-native": "^1.4.7", "@facephi/sdk-selphi-react-native": "^1.4.3", "@facephi/sdk-selphid-react-native": "^1.4.8", "@gorhom/bottom-sheet": "^4.6.1", "@react-native-async-storage/async-storage": "^1.23.1", "@react-native-community/datetimepicker": "^7.6.4", "@react-native-community/geolocation": "^3.2.1", "@react-native-community/netinfo": "^11.3.1", "@react-native-firebase/app": "^19.1.2", "@react-native-firebase/auth": "^19.1.2", "@react-native-firebase/messaging": "^19.1.2", "@react-native-masked-view/masked-view": "0.3.1", "@react-native/babel-plugin-codegen": "^0.74.78", "@react-native/codegen": "^0.74.78", "@react-native/metro-babel-transformer": "^0.74.78", "@react-navigation/native": "^6.1.17", "@react-navigation/stack": "^6.3.29", "@sideway/formula": "^3.0.1", "@xmldom/xmldom": "^0.8.10", "ansi-regex": "^6.0.1", "async": "^3.2.5", "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-transform-remove-console": "^6.9.4", "babel-traverse": "^6.26.0", "babylon": "^6.18.0", "class-validator": "^0.14.1", "core-js": "^3.36.1", "date-fns": "^3.6.0", "decode-uri-component": "^0.4.1", "deprecated-react-native-prop-types": "^5.0.0", "expo": "~50.0.14", "expo-asset": "~9.0.2", "expo-av": "~13.10.5", "expo-barcode-scanner": "~12.9.3", "expo-camera": "^14.1.1", "expo-clipboard": "~5.0.1", "expo-constants": "~15.4.5", "expo-contacts": "~12.8.2", "expo-crypto": "~12.8.1", "expo-device": "~5.9.3", "expo-file-system": "~16.0.8", "expo-image-manipulator": "~11.8.0", "expo-image-picker": "~14.7.1", "expo-linear-gradient": "~12.7.2", "expo-local-authentication": "~13.8.0", "expo-location": "~16.5.5", "expo-media-library": "~15.9.1", "expo-modules-core": "^1.11.12", "expo-network": "~5.8.0", "expo-notifications": "~0.27.6", "expo-permissions": "~14.4.0", "expo-secure-store": "~12.8.1", "expo-sharing": "~11.10.0", "expo-status-bar": "~1.11.1", "expo-updates": "^0.24.12", "i18next": "^23.11.0", "jpeg-js": "^0.4.4", "json-schema": "^0.4.0", "json5": "^2.2.3", "metro-babel-transformer": "^0.80.8", "metro-react-native-babel-transformer": "^0.77.0", "metro-minify-terser": "^0.80.8", "minimist": "^1.2.8", "node-fetch": "^3.3.2", "nth-check": "^2.1.1", "postcss": "^8.4.38", "qs": "^6.12.0", "react": "^18.2.0", "react-devtools-core": "^5.0.2", "react-dom": "^18.2.0", "react-i18next": "^14.1.0", "react-native": "0.73.6", "react-native-animatable": "^1.4.0", "react-native-app-intro-slider": "^4.0.4", "react-native-background-timer": "^2.4.1", "react-native-base64": "^0.2.1", "react-native-biometrics": "^3.0.1", "react-native-check-box": "^2.1.7", "react-native-confirmation-code-input": "^1.0.4", "react-native-dotenv": "^3.4.11", "react-native-dropdownalert": "^5.1.0", "react-native-exit-app-v2": "^1.2.2", "react-native-floating-action": "^1.22.0", "react-native-geolocation-service": "^5.3.1", "react-native-gesture-handler": "~2.16.0", "react-native-get-random-values": "^1.11.0", "react-native-global-font": "^1.0.3", "react-native-internet-connection-alert": "^0.1.9", "react-native-linear-gradient": "^2.8.3", "react-native-localize": "^3.1.0", "react-native-maps": "1.13.0", "react-native-obfuscating-transformer": "^1.0.0", "react-native-pager-view": "6.3.0", "react-native-paper": "^5.12.3", "react-native-public-ip": "^1.0.2", "react-native-qrcode-svg": "^6.3.0", "react-native-reanimated": "~3.8.1", "react-native-safe-area-context": "^4.9.0", "react-native-safe-area-view": "^1.1.1", "react-native-screens": "~3.30.1", "react-native-simple-crypto": "^0.2.15", "react-native-skeleton-placeholder": "^5.2.4", "react-native-snap-carousel": "^4.0.0-beta.6", "react-native-svg": "^15.1.0", "react-native-tab-view": "^3.5.2", "react-native-torch": "^1.2.0", "react-native-uuid": "^2.0.2", "react-native-vector-icons": "^10.0.3", "react-native-view-shot": "3.8.0", "react-native-web": "^0.19.10", "react-native-windows": "^0.73.11", "react-redux": "^9.1.0", "redux": "^5.0.1", "redux-thunk": "^3.1.0", "semver": "^7.6.0", "shelljs": "^0.8.5", "simple-plist": "^1.3.1", "tmpl": "^1.0.5", "ua-parser-js": "^1.0.37", "url-parse": "^1.5.10", "uuid": "^9.0.1", "validator": "^13.11.0", "word-wrap": "^1.2.5", "xmldom": "^0.6.0" }, "devDependencies": { "@babel/core": "^7.24.4", "@babel/preset-env": "^7.24.4", "@babel/runtime": "^7.24.4", "@react-native/babel-preset": "0.74.78", "@react-native/eslint-config": "0.74.78", "@react-native/metro-config": "0.74.78", "@react-native/typescript-config": "0.74.78", "@types/react": "^18.2.74", "@types/react-test-renderer": "^18.0.7", "babel-jest": "^29.7.0", "eslint": "^8.47.0", "jest": "^29.7.0", "patch-package": "^8.0.0", "postinstall-postinstall": "^2.1.0", "prettier": "^3.2.5", "react-test-renderer": "^18.2.0", "typescript": "^5.4.4" }, "engines": { "node": ">=18" }, "expo-yarn-workspaces": { "symlinks": [ "expo-constants" ] }, "private": true, "name": "test2", "version": "1.0" }

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: Windows 10 10.0.19045
  CPU: (16) x64 Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
  Memory: 6.76 GB / 31.72 GB
Binaries:
  Node:
    version: 18.17.1
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 10.4.0
    path: C:\Program Files\nodejs\npm.CMD
  Watchman:
    version: 20201220.042258.0
    path: C:\Users\cerivera\AppData\Local\watchman\watchman.EXE
SDKs:
  Android SDK:
    API Levels:
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
    Build Tools:
      - 28.0.3
      - 29.0.0
      - 29.0.1
      - 29.0.2
      - 29.0.3
      - 30.0.0
      - 30.0.1
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 32.1.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-30 | Google Play Intel x86 Atom
      - android-31 | Google APIs Intel x86 Atom_64
      - android-31 | Google Play Intel x86 Atom_64
      - android-32 | Google APIs ARM 64 v8a
      - android-32 | Google APIs Intel x86_64 Atom
      - android-32 | Google Play Intel x86 Atom_64
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google APIs Intel x86_64 Atom
      - android-33 | Google Play Intel x86_64 Atom
      - android-34 | Intel x86_64 Atom
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google APIs Intel x86_64 Atom
      - android-UpsideDownCakePrivacySandbox | Google Play Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK:
    AllowAllTrustedApps: Disabled
IDEs:
  Android Studio: AI-212.5712.43.2112.8815526
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.10
    path: C:\Program Files\Java\jdk-17\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: ^18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
  react-native-windows:
    installed: 0.73.11
    wanted: ^0.73.11
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

[\node_modules\react-native\Libraries\Components\TextInput\RCTInputAccessoryViewNativeComponent.js: NodePath has been removed so is read-only.](error: node_modules\react-native\Libraries\Components\TextInput\RCTInputAccessoryViewNativeComponent.js: C:\Users\test\Documents\test2\node_modules\react-native\Libraries\Components\TextInput\RCTInputAccessoryViewNativeComponent.js: NodePath has been removed so is read-only.)

Reproducer

I can't reproduce it, the error just comes from updating from one version to another, I will attach my package.json, there are no error stacks, I don't know what to add to fix it.

Screenshots and Videos

cipolleschi commented 2 months ago

Can you check two things:

  1. is your JS code explicitly using this path: \node_modules\react-native\Libraries\Components\TextInput\RCTInputAccessoryViewNativeComponent.js in some import or require?
  2. do you have that path in your node_modules?

Can you try to remove the node_modules folder and run yarn install again?

CCB-cerivera commented 2 months ago

Hello, thanks for responding, I respond in the same order:

  1. It is the path where the node_module are, the error appears when loading the components, it is variable since the list of errors is very long but they all boil down to the same thing "NodePath has been removed so is read-only. "

  2. Yes

  3. I have done the following:

It still doesn't work, it always falls into the same error.

I have configuration files in babel.config.js

module.exports = function (api) { api.cache(true); return { presets: [ 'babel-preset-expo', [ 'module:@react-native/babel-preset', {useTransformReactJSXExperimental: true}, ], ], plugins: [ [ 'module:react-native-dotenv', { envName: 'APP_ENV', moduleName: '@env', path: '.env.dev', safe: false, allowUndefined: true, verbose: false, }, ], 'react-native-reanimated/plugin', [ 'module-resolver', { alias: { '@navigation': './navigation', '@screens': './screens', '@resources': './resources', '@constants': './constants', '@styles': './styles', }, }, ], "babel-plugin-root-import", [ "@babel/plugin-proposal-class-properties", { loose: true, }, ], ], }; };

cipolleschi commented 2 months ago

if you create a new project with the new version, does the problem manifest?

CCB-cerivera commented 2 months ago

No, but yesterday I removed [ 'module:@react-native/babel-preset', {useTransformReactJSXExperimental: true}, ] from babel.config.js and it let me through, with some errors but it started work, what I see is that babel-preset-expo and @react-native/babel-preset do not have the same compatibility as when I had the previous module of module:metro-react-native-babel-preset question: Will you have any knowledge of the correct expo and react-native preset settings?

CCB-cerivera commented 2 months ago

For those who have this problem, it is because there is some kind of conflict with 'babel-preset-expo', and [ 'module:@react-native/babel-preset', {useTransformReactJSXExperimental: true} , ] the solution was to remove @react-native/babel-preset and leave the expo one, after that I checked some libraries for incompatibility and it was solved.