facebook / react-native

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

Property 'document' doesn't exist - iOS only #38917

Closed SavinienBarbotaud closed 1 year ago

SavinienBarbotaud commented 1 year ago

Description

I know it's look like the common mistake.

Append on iOS only, android version work fine.

I search on my project to see if im using 'document' statement somewhere but never found it.

React Native Version

0.72.3

Output of npx react-native info

System: OS: macOS 13.5 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 25.20 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.17.0 path: /usr/local/bin/node Yarn: Not Found npm: version: 9.8.1 path: /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: version: 1.12.1 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:

Steps to reproduce

Start a react-native project on linux. import necessary libs (npm list bottom)

Moving to iOS : npm run iOS, compiling is fine the error is show up when the app launch

Snack, screenshot, or link to a repository

output of npm list, maybe some package are wrong but don't know why : ├── @apirtc/apirtc@5.0.13 ├── @babel/core@7.22.5 ├── @config-plugins/react-native-webrtc@6.0.0 ├── @expo/webpack-config@18.1.0 ├── @notifee/react-native@7.8.0 ├── @react-native-picker/picker@2.4.8 ├── expo-splash-screen@0.18.2 ├── expo-status-bar@1.4.4 ├── expo@48.0.20 ├── hermes-engine@0.11.0 ├── react-dom@18.2.0 ├── react-native-device-info@10.6.0 ├── react-native-gesture-handler@2.12.1 ├── react-native-svg@13.9.0 ├── react-native-web@0.18.12 ├── react-native-webrtc@111.0.1 ├── react-native@0.72.3 ├── react@18.2.0 └── socket.io-client@4.6.2

github-actions[bot] commented 1 year 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.
cortinico commented 1 year ago

I search on my project to see if im using 'document' statement somewhere but never found it.

Can you share more information on your code and the exact error message? Also please provide a reproducer.

SavinienBarbotaud commented 1 year ago

Hi, sorry for the late response, one of my dependencies have a web dependencies. The package was marked supported by react-native.