Skip to content

expo react-native-web bundling #4

@spendres

Description

@spendres

layerr resolves and works in ios using expo/react-native, but not in web using expo/react-native-web.

for example...

npx create-expo-app layerr-demo --template blank-typescript
cd layerr-demo
npx expo install react-dom react-native-web @expo/metro-runtime
npx expo start (launches metro bundler on port 8081... or ask you if 8082 is okay if 8081 is already in use)
w (type w to open web version)

The basic demo shows the "Edit App.tsx to see changes message in the browser window". So far so good.

npx expo install layerr
add the following 2 lines to App.tsx:
import { setGlobalName } from "layerr";
setGlobalName("CustomError");

w (type w again to reload web)

The server replies with:
Web Bundling failed 117ms index.ts (119 modules)
Unable to resolve "layerr" from "App.tsx"

This appears to be a module resolution issue. The module resolution message says that layerr package.json contains a main module that cannot be found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions