I am facing 'Error: Unable to resolve module os' in this file node_modules/@opentelemetry/resources/build/src/detectors/platform/node/HostDetectorSync.js #5240
Labels
question
User is asking a question not related to a new feature or bug
runtime:hermes
Unsupported Runtime Hermes
Hello Everyone,
I am facing this below error, I am using this library in my RN project i think there are some code which is trying to use the Node.js os module, which is not available in the React Native environment. React Native doesn't support Node.js core modules like os, fs, etc. Is there newer or older version of OpenTelemetry that offers better React Native support.
error: Error: Unable to resolve module os from /Users/praveen36singhq/Desktop/demoCoach/TodoListMobile/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/HostDetectorSync.js: os could not be found within the project or in these directories:
node_modules
dependencies:
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.55.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.55.0",
"@opentelemetry/resources": "^1.28.0",
"@opentelemetry/sdk-metrics-base": "^0.31.0",
"@opentelemetry/sdk-trace-base": "^1.28.0",
"@opentelemetry/sdk-trace-web": "^1.28.0",
"react": "17.0.1",
"react-native": "0.64.2",
"react-native-get-random-values": "^1.11.0"
The text was updated successfully, but these errors were encountered: