Skip to content

Remove "main" in package.json breaks Metro / React Native projects #55

@TomCorvus

Description

@TomCorvus

Description

After commit f9c92d24165e, the main field was removed from package.json.

Removing the main field causes Metro (React Native) to no longer find the package entry. After this change, importing expo-quick-actions fails in React Native projects because Metro cannot resolve the entry file.

Steps to Reproduce

  1. Create a React Native project using Expo.
  2. Install expo-quick-actions at the latest version.
  3. Import the package in any file:
import QuickActions from 'expo-quick-actions';
  1. Run the project with Expo / Metro.
  2. Observe the module resolution error.

Expected Behavior

The package should resolve correctly in React Native / Metro projects without errors.

Suggested Solution

To maintain compatibility with Metro, the main field should point to the React Native entry file, for example:

"main": "build/index.js"

This ensures that Metro can correctly resolve the package entry.

Environment
expo-quick-actions: 6.0.1
React Native / Expo version: 0.81.5 / 54.0.31
Metro bundler: default Expo Metro

Thanks

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