mapcn-react-native
CLI

doctor

Diagnoses the project's installation and configuration -- 14 independent checks, none of which abort the rest on failure.

npx mapcn-rn doctor [--json] [--verbose]

doctor is non-mutating. Each check runs independently (a failure in one never skips the rest) and is leveled ok / warn / error / info. The process exits 1 if any check is error-level.

Checks

CheckLevel on failureNotes
Expo/RN project detectederror if no package.json; warn if no expo dependency
Package manager detectedwarn if no lockfile foundNever assumed -- based on the nearest lockfile.
mapcn.json present, schema version supportederrorIf missing, only this check and legacy-v1 detection run; everything else needs a config.
Renderer package installederrorChecks package.json deps for @maplibre/maplibre-react-native or @rnmapbox/maps, matching the configured renderer.
Both renderer packages presenterrorThe documented "cannot have both" plugin conflict.
Expo plugin present and matches renderererror; warn if no app.json
Mapbox downloads tokenwarnOnly when renderer is mapbox; checks MAPBOX_DOWNLOADS_TOKEN in the environment or .env.
Basemap provider configurederror if unrecognized
Required provider env key presenterrorOnly when the provider requiresKey (skipped entirely for CARTO).
iOS location permissionerrorOnly when location or location-puck is installed.
Android location permissionserrorSame condition as above.
Legacy v1 installation detectedinfoOnly surfaces when mapcn.json is absent and a components/ui/map.tsx exists -- points at migrate.
Local modificationsinfo (not a failure)Reports which installed files have drifted from their recorded hash.
Missing registry dependencieserrorOnly runs when the registry manifest was reachable; skipped gracefully offline.

Flags

FlagDescription
--jsonMachine-readable output: { checks, summary: { ok, warn, error, info } }.
--verboseAlso print passing (ok-level) checks in the human-readable output.

Example output

✓ Expo project detected
✓ Package manager: pnpm
✓ @maplibre/maplibre-react-native installed
✓ Expo plugin "@maplibre/maplibre-react-native" present in app.json
✓ Basemap provider: MapTiler
✓ EXPO_PUBLIC_MAPTILER_API_KEY is set
ℹ 1 component file(s) have local modifications: controls/components/ui/mapcn/map-controls.tsx -- this is fine, just tracked for provider/migrate safety.
✗ Component "choropleth" depends on "geojson" which is not installed

1 error(s), 0 warning(s) found

init · migrate · provider · Permissions

On this page