Skip to content

fix: autolinking.json breaks whenever console.log is added to react-native.config.js #2679

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

riteshshukla04
Copy link

@riteshshukla04 riteshshukla04 commented Jun 25, 2025

Summary

Fixes #2678. Please refer #2678 for detailed issue of the bug.
Maybe add this behind a flag and pass the same flag in RNGP when autolinking.json gets created

Test Plan

image

Can be tested by adding console.log to react-native.config.js and then running npx @react-native-community/cli config

Checklist

  • Documentation is up to date.
  • Follows commit message convention described in CONTRIBUTING.md.
  • For functional changes, my test plan has linked these CLI changes into a local react-native checkout (instructions).

@cortinico
Copy link
Member

Not sure why you would want to add console.logs in your react-native.config.js though

@riteshshukla04
Copy link
Author

Hey @cortinico
Honestly, I'm not even sure if we actually need this — I just stumbled upon the bug while debugging something else. It doesn’t impact me personally, but I figured I'd give it a shot and patch it anyway… you know, for the greater good 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autolinking.json breaks whenever console.log is added to react-native.config.js
2 participants