facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.23k stars 24.34k forks source link

ModuleNotFoundError: Module not found: Error: Can't resolve '../Utilities/Platform' #43718

Closed quantrpeter closed 7 months ago

quantrpeter commented 7 months ago

Description

{ "homepage": "https://www.lionsclubs.org.hk/mobile/", "scripts": { "start": "expo start --dev-client", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@expo/vector-icons": "^13.0.0", "@expo/webpack-config": "^18.0.1", "@km.js/react-aliyun-human-verify": "0.0.5", "@native-html/iframe-plugin": "^2.6.1", "@react-native-async-storage/async-storage": "^1.22.3", "@react-native-community/blur": "^4.2.0", "@react-native-community/datetimepicker": "7.2.0", "@react-native-community/netinfo": "9.3.10", "@react-native-picker/picker": "2.4.10", "@react-navigation/bottom-tabs": "^6.3.2", "@react-navigation/material-top-tabs": "^6.2.2", "@react-navigation/native": "^6.0.11", "@react-navigation/native-stack": "^6.7.0", "axios": "^0.24.0", "expo": "^49.0.6", "expo-asset": "~8.10.1", "expo-barcode-scanner": "~12.5.3", "expo-clipboard": "~4.3.0", "expo-dev-client": "~2.4.6", "expo-doctor": "^1.1.2", "expo-file-system": "~15.4.2", "expo-linear-gradient": "~12.3.0", "expo-splash-screen": "~0.20.5", "expo-sqlite": "~11.3.2", "expo-status-bar": "~1.6.0", "expo-system-ui": "~2.4.0", "expo-updates": "~0.18.11", "expo-web-browser": "~12.3.2", "invariant": "^2.2.4", "moment": "^2.29.4", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.72.3", "react-native-animatable": "^1.3.3", "react-native-calendars": "^1.1284.0", "react-native-elements": "^3.4.2", "react-native-flatlist-slider": "^1.0.6", "react-native-geocoding": "^0.5.0", "react-native-gesture-handler": "~2.12.0", "react-native-keychain": "^8.2.0", "react-native-maps": "1.7.1", "react-native-pager-view": "6.2.0", "react-native-paper": "^4.12.4", "react-native-reanimated": "~3.3.0", "react-native-render-html": "^6.3.4", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-select-dropdown": "^2.0.4", "react-native-size-matters": "^0.4.0", "react-native-storage": "^1.0.1", "react-native-tab-view": "^3.1.1", "react-native-ui-lib": "^6.21.2", "react-native-uuid": "^2.0.1", "react-native-web": "~0.19.6", "react-native-webview": "^13.3.1", "react-overflow-scrolling": "^1.0.1", "rn-checkbox-list": "^1.1.0", "run": "^1.4.0", "run-ios": "^0.4.0", "setimmediate": "^1.0.5", "shortid": "^2.2.16", "webpack-dev-server": "^4.10.0" }, "devDependencies": { "@babel/core": "^7.20.0", "@types/googlemaps": "^3.43.3", "@types/jquery": "^3.5.14", "@types/react": "~18.2.14", "stream": "0.0.2", "string-builder": "^0.1.8", "typescript": "^5.1.3" }, "resolutions": { "@types/react": "17.0.2", "react-native-uuid": "^2.0.1" }, "private": true, "name": "lions-clubs-app-v2", "version": "1.0.0" }

Steps to reproduce

npx expo export:web

React Native Version

0.72.3

Affected Platforms

Build - MacOS

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: macOS 12.7.4
  CPU: (8) x64 Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
  Memory: 109.79 MB / 16.00 GB
  Shell:
    version: 5.8.1
    path: /bin/zsh
Binaries:
  Node:
    version: 16.20.1
    path: ~/.nvm/versions/node/v16.20.1/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v16.20.1/bin/yarn
  npm:
    version: 8.19.4
    path: ~/.nvm/versions/node/v16.20.1/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK: Not Found
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: /undefined
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.1
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.3
    wanted: 0.72.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

Exporting with Webpack...
Failed to compile
ModuleNotFoundError: Module not found: Error: Can't resolve '../Utilities/Platform' in '/Users/peter/workspace/lions-clubs-app-v2/node_modules/react-native/Libraries/ReactPrivate'
ModuleNotFoundError: Module not found: Error: Can't resolve '../Utilities/Platform' in '/Users/peter/workspace/lions-clubs-app-v2/node_modules/react-native/Libraries/ReactPrivate'
    at /Users/peter/workspace/lions-clubs-app-v2/node_modules/webpack/lib/Compilation.js:2022:28
    at /Users/peter/workspace/lions-clubs-app-v2/node_modules/webpack/lib/NormalModuleFactory.js:817:13
    at eval (eval at create (/Users/peter/workspace/lions-clubs-app-v2/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at /Users/peter/workspace/lions-clubs-app-v2/node_modules/webpack/lib/NormalModuleFactory.js:275:22
    at eval (eval at create (/Users/peter/workspace/lions-clubs-app-v2/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /Users/peter/workspace/lions-clubs-app-v2/node_modules/webpack/lib/NormalModuleFactory.js:448:22
    at /Users/peter/workspace/lions-clubs-app-v2/node_modules/webpack/lib/NormalModuleFactory.js:118:11
    at /Users/peter/workspace/lions-clubs-app-v2/node_modules/webpack/lib/NormalModuleFactory.js:689:25
    at /Users/peter/workspace/lions-clubs-app-v2/node_modules/webpack/lib/NormalModuleFactory.js:893:8
    at /Users/peter/workspace/lions-clubs-app-v2/node_modules/webpack/lib/NormalModuleFactory.js:1013:5

Reproducer

https://github.com/quantrpeter

Screenshots and Videos

No response

github-actions[bot] commented 7 months ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
github-actions[bot] commented 7 months ago
:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.72.12. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
tarunrajput commented 7 months ago

@quantrpeter, Pls add a valid reproducer

cortinico commented 7 months ago

@quantrpeter, Pls add a valid reproducer

Closing as haven't provided a repro as @tarunrajput + you're using expo so you should report this against https://github.com/expo/expo