react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Metro bundling fails because of parseLogBoxLog.js

Open habovh opened this issue 2 years ago • 3 comments

New Version

0.71.3

Old Version

0.68.3

Build Target(s)

iOS simulator, Android device in debug flavor

Output of react-native info

warn Package @sentry/react-native contains invalid configuration: "dependency.platforms.ios.sharedLibraries" is not allowed,"dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
warn Package react-native-navigation contains invalid configuration: "dependency.assets" is not allowed,"dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
warn Package react-native-vector-icons contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
warn Package rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
    OS: macOS 13.2
    CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
    Memory: 168.81 MB / 20.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.12.1 - /var/folders/n8/l8xdjt192lb9lpfrkyh9v57m0000gn/T/yarn--1677758510889-0.8002897631823127/node
    Yarn: 1.22.18 - /var/folders/n8/l8xdjt192lb9lpfrkyh9v57m0000gn/T/yarn--1677758510889-0.8002897631823127/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
    Watchman: 2023.01.09.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/jordanbecker/.rvm/gems/ruby-2.7.6/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.1 AI-221.6008.13.2211.9514443
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.16.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.3 => 0.71.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
✨  Done in 8.25s.

Issue and Reproduction Steps

I'm getting an error from parseLogBoxLog.js when running the app in debug mode. This error gets displayed on the on-screen error modal as well.

It seems there is a workaround by installing @babel/plugin-proposal-unicode-property-regex as suggested on this StackOverflow question, however I feel like this should somehow be part of React Native, or mentioned in the install instructions if that's the way to go.

Metro log:

 BUNDLE  ./index.js 

error: node_modules/react-native/Libraries/LogBox/Data/parseLogBoxLog.js: /Users/jordanbecker/Repositories/allsquare/mobile-app/node_modules/react-native/Libraries/LogBox/Data/parseLogBoxLog.js: .useUnicodeFlag is not a valid regexpu-core option.

On-screen error: Simulator Screen Shot - iPhone 14 Pro - 2023-03-02 at 13 06 05

habovh avatar Mar 02 '23 12:03 habovh

@habovh were you able to find a workaround for this?

rlam3 avatar Aug 11 '23 15:08 rlam3

@rlam3 as per my initial post, yes, there's a workaround with @babel/plugin-proposal-unicode-property-regex but I think this issue should be handled on RN directly.

habovh avatar Aug 11 '23 16:08 habovh

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Feb 08 '24 05:02 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Feb 15 '24 05:02 github-actions[bot]