Skip to content

React Native 0.73 npx rnn-link doesn't work  #7821

Closed
@retyui

Description

@retyui

What happened?

starting from rn73 *.java files was convened to *.kt
so auto-linking doesn't work properly

npx rnn-link

/tmp/Rn73/node_modules/react-native-navigation/autolink/postlink/path.js:10
exports.rootGradle = mainApplicationJava.replace(/android\/app\/.*\.java/, 'android/build.gradle');
                                         ^

TypeError: Cannot read properties of undefined (reading 'replace')
    at Object.<anonymous> (/Users/davydnarbutovich/tmp/Rn73/node_modules/react-native-navigation/autolink/postlink/path.js:10:42)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/Users/davydnarbutovich/tmp/Rn73/node_modules/react-native-navigation/autolink/postlink/applicationLinker.js:2:12)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)

What was the expected behaviour?

no js error, *.kt files supported out of the box

Was it tested on latest react-native-navigation?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

React Native Navigation version: 7.37.2
React Native version: 0.73
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: 18
Device model:
Android version:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions