-
Notifications
You must be signed in to change notification settings - Fork 25k
Description
Description
While I tried to import my screen componets from ./screens which were in .jsx extension initially had some problem importing it.But when I changed the extension to .js was able to import them without any problem.
Version
0.67.2
Output of npx react-native info
System:
OS: Windows 10 10.0.22000
CPU: (8) x64 AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
Memory: 1001.20 MB / 5.88 GB
Binaries:
Node: 14.17.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 29, 30, 32
Build Tools: 29.0.2, 30.0.2, 32.0.0, 32.1.0
System Images: android-29 | Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8092744
Visual Studio: Not Found
Languages:
Java: 15.0.2 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.2 => 0.67.2
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Files with .jsx extension throw an import error saying:
error: Error: Unable to resolve module ./screens/OnBoarding1 from C:\Users\alroyfernz\Desktop\Programming\Bloom.bit\pharmacy_app\App.js:
Later digging into the solution I just tried to change the extension from .jsx to .js and it worked.



