Module not found: Can’t resolve ‘../Utilities/Platform’

Description

After adding react-native-video I am getting this error.
I checked the repo and I see that no such a file called Platform.js exists, but there are Platform.android.js and Platform.android.js.
Does anyone know the expected behavior for loading this file, and how it’s supposed work for web.

/node_modules/react-native/Libraries/Image/AssetSourceResolver.js:24:17
Module not found: Can't resolve '../Utilities/Platform'
  22 | 
  23 | const PixelRatio = require('../Utilities/PixelRatio');
> 24 | const Platform = require('../Utilities/Platform');

Version

0.64.3

Output of npx react-native info

info Fetching system and libraries information…
System:
OS: Windows 10 10.0.19043
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 7.97 GB / 31.86 GB
Binaries:
Node: 12.13.0 – C:\Program Files\nodejs\node.EXE
Yarn: 1.22.0 – ~\AppData\Roaming\npm\yarn.CMD
npm: 6.12.0 – C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
IDEs:
Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7784292
Visual Studio: Not Found
Languages:
Java: 17.0.1 – C:\Program Files\Eclipse Adoptium\jdk-17.0.1.12-hotspot\bin\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

import Video from “react-native-video”;

Snack, code example, screenshot, or link to a repository

No response

1 thought on “Module not found: Can’t resolve ‘../Utilities/Platform’

Comments are closed.