cli icon indicating copy to clipboard operation
cli copied to clipboard

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

Open riteshshukla04 opened this issue 5 months ago • 2 comments

Summary

Fixes https://github.com/react-native-community/cli/issues/2678. Please refer https://github.com/react-native-community/cli/issues/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

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

riteshshukla04 avatar Jun 25 '25 19:06 riteshshukla04

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

cortinico avatar Jun 26 '25 07:06 cortinico

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 😄

riteshshukla04 avatar Jun 26 '25 09:06 riteshshukla04

There hasn't been any activity on this pull request in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.

github-actions[bot] avatar Sep 25 '25 03:09 github-actions[bot]