rnmapbox / rnmapbox/maps

Cannot find module issues persist

Open
#4,286 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug-setup 🪲
Dominant language
Kotlin
Stars
2.9k
Forks
947
Avg merge
6d 37m
Merged PRs (30d)
1

Description

Requirements: This library requires Mapbox Maps SDK v11 and React Native 0.79+ with New Architecture (Fabric/TurboModules).

For sponsors-only support and resources: https://github.com/rnmapbox/maps/wiki/SponsorsRepo
Become a sponsor for special support: https://github.com/sponsors/rnmapbox


Environment

  • Dev OS: Windows 11 (PowerShell)
  • @rnmapbox/maps version: 10.3.5
  • React Native version: Expo SDK 57 (React Native 0.73+)
  • Expo CLI version: 57.0.18
  • pnpm version: 11.23.0

Steps to reproduce

pnpx create-expo-app sample
cd sample

# Install rnmapbox/maps
pnpm expo install @rnmapbox/maps@latest

# Add plugin
# app.json:
# {
#   "expo": {
#     "plugins": ["@rnmapbox/maps"]
#   }
# }

pnpm expo prebuild --clean
pnpm expo run:android

Actual behavior

1. Expo cannot resolve the config plugin in app.json

In VS Code, hovering over "@rnmapbox/maps" inside "plugins" shows:
Cannot find module '@rnmapbox/maps'

2. Expo prebuild fails with module resolution errors

During the Expo config plugin phase, the build fails with:
Cannot find module '@rnmapbox/maps'

Expected Behavior

Expo’s config plugin should be discoverable in app.json, and Expo should load:
lib/module/Mapbox.js

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the stated React Native requirement with the Expo environment in app.json and the reported @rnmapbox/maps version. Start by reproducing pnpm expo prebuild --clean and inspect the plugin entry at lib/module/Mapbox.js. Done means Expo resolves the plugin from app.json and the prebuild step completes without module-resolution errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript, react-native
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.