Describe the bug
Hey, after importing config from react-native-ultimate-config, I'm getting this error
error: Error: Cannot resolve ./override
at /project/node_modules/@nx/react-native/plugins/metro-resolver.js:31:15
at Object.resolve (/ project/node_modules/metro-resolver/src/resolve.js:47:12)
at ModuleResolver.resolveDependency (/ project/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:79:31)
at DependencyGraph.resolveDependency ( /project/node_modules/metro/src/node-haste/DependencyGraph.js:277:43)
at Object.resolve ( /project/node_modules/metro/src/lib/transformHelpers.js:169:21)
at Graph._resolveDependencies ( /project/node_modules/metro/src/DeltaBundler/Graph.js:473:35)
at Graph._processModule ( /project/node_modules/metro/src/DeltaBundler/Graph.js:261:38)
at async Graph._addDependency ( /project/node_modules/metro/src/DeltaBundler/Graph.js:372:20)
at async Promise.all (index 7)
at async Graph._processModule (/ project/node_modules/metro/src/DeltaBundler/Graph.js:322:5)
Steps to Reproduce
- Just install the package in a react native project, and import config from the package.
- Getting the metro resolver error.
Steps to reproduce the behavior.
Please consider creating small project that demonstrates the problem.
Having done clean setup helps pinpointing the problem.
Expected behavior
This snippet should work
// import module
import config from "react-native-ultimate-config";
// access variables
config.MY_CONFIG;
Stacktraces, logs, screenshots
Post stacktraces, logs or screenshots. The more information is available
is better.
Environment
Integration option
Env file
Example of env file that is causing problems
❗PROVIDE EXAMPLE OF ENV FILE
OS
Packages
- version of
react-native: ❗0.72.3
- version of
react-native-ultimate-config: ❗6.0.1
Run react-native info and post below:
System:
OS: macOS 13.3
CPU: (8) arm64 Apple M1
Memory: 62.13 MB / 8.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 19.5.0
path: /var/folders/w1/6fkl87mj5n9cmc_nk6xfsz7h0000gn/T/yarn--1704361025739-0.5088639990007069/node
Yarn:
version: 1.22.19
path: /var/folders/w1/6fkl87mj5n9cmc_nk6xfsz7h0000gn/T/yarn--1704361025739-0.5088639990007069/yarn
npm:
version: 9.3.1
path: ~/.nvm/versions/node/v19.5.0/bin/npm
Watchman:
version: 2023.05.22.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.11.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK:
API Levels:
- "23"
- "28"
- "29"
- "30"
- "31"
- "33"
Build Tools:
- 28.0.3
- 29.0.2
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
- 34.0.0
System Images:
- android-31 | Google APIs ARM 64 v8a
- android-31 | Google Play ARM 64 v8a
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7678000
Xcode:
version: 14.3/14E222b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 1.8.0_292
path: /usr/bin/javac
Ruby:
version: 3.2.2
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: "*"
react-native:
installed: 0.72.3
wanted: "*"
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Additional context
Add any other context about the problem here.
Describe the bug
Hey, after importing config from react-native-ultimate-config, I'm getting this error
Steps to Reproduce
Steps to reproduce the behavior.
Please consider creating small project that demonstrates the problem.
Having done clean setup helps pinpointing the problem.
Expected behavior
This snippet should work
Stacktraces, logs, screenshots
Post stacktraces, logs or screenshots. The more information is available
is better.
Environment
Integration option
rnucCLI to inject environment (default integration optionfrom quickstart guide)
option from cookbook:
scheme,
flavors)
react-native-ultimate-configwithin monorepo managed with NX MonorepoEnv file
Example of env file that is causing problems
OS
Packages
react-native: ❗0.72.3react-native-ultimate-config: ❗6.0.1Run
react-native infoand post below:Additional context
Add any other context about the problem here.