Metro bundler: Cannot read properties of undefined (reading 'transformFile')

Viewed 3043

I've stuck with a problem after update my project to expo SDK 43 I've tried different LTS node version (14.8.1 ,16.1.3 and 17.0.1) but the problem was not solved. My colleagues have not this problem on thier macs with intel chipset so I think it's can be cause by macbook with m1 chipset.

I will be very thankful if you can help me to solve this metro bundler problem

System:
    OS: macOS 12.0.1
    CPU: (8) x64 Apple M1
    Memory: 24.91 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - /var/folders/7x/bz3djxwn5kd3k16j2015bvhc0000gn/T/yarn--1637063410446-0.9243514868796017/node
    Yarn: 1.22.10 - /var/folders/7x/bz3djxwn5kd3k16j2015bvhc0000gn/T/yarn--1637063410446-0.9243514868796017/yarn
    npm: 6.14.11 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.2 => 0.64.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

IOS simulator log

Terminal log

1 Answers

The issue is probably due to node 17.x, i recommande downgrading to node 14.18.1, then delete node_modules and reinstall them.

Related