Is @effect/platform works with React Native (Expo)?
When trying to use
@effect/platform
@effect/platform
in an
Expo
Expo
project, I encounter this cryptic error:
iOS Bundling failed 882ms index.js (1112 modules)The package at "node_modules/msgpackr/dist/node.cjs" attempted to import the Node standard library module "stream".It failed because the native React runtime does not include the Node standard library.Learn more: https://docs.expo.dev/workflow/using-libraries/#using-third-party-libraries
iOS Bundling failed 882ms index.js (1112 modules)The package at "node_modules/msgpackr/dist/node.cjs" attempted to import the Node standard library module "stream".It failed because the native React runtime does not include the Node standard library.Learn more: https://docs.expo.dev/workflow/using-libraries/#using-third-party-libraries
Is it a bug or something obvious I missed?
It's easy to reproduce. Just create a simple project using the following commands:
import { Text } from 'react-native';import { HttpApi } from "@effect/platform";console.log(HttpApi)export default function App() { return <Text>Trying Effect Platform on Expo</Text>;}
import { Text } from 'react-native';import { HttpApi } from "@effect/platform";console.log(HttpApi)export default function App() { return <Text>Trying Effect Platform on Expo</Text>;}