Mapilary-js cant be imported in React Router 7 (Vite 5.4.11)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript, vite
- Domain
- build-system, frontend
Research direction
Reproduce the failure in the React Router 7 project, starting with the imports referenced in app/components/map/import.js and app/components/map/index.tsx. Inspect how mapillary-js exports are resolved by Vite's SSR path, then verify that the reported Viewer and ViewerOptions imports work in the stated setup.
Written by the indexing model from the issue text.
Description
Basic information
MapillaryJS version: "mapillary-js": "^4.1.2",
System/Browser: Mac OS, Node 22.11.0
Steps to Reproduce Behavior
- Create a project using react router 7 (Vite 5.4.11)
- Add mapillary-js
- Import { Viewer, ViewerOptions }
- Try to run project
Expected behavior
Project runs
Actual behavior
Internal server error: [vite] The requested module 'mapillary-js' does not provide an export named 'ViewerOptions'
at analyzeImportedModDifference (file:///Users/chanan/work/list_test_cli/maps/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52053:15)
at nodeImport (file:///Users/chanan/work/list_test_cli/maps/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:53060:5)
at ssrImport (file:///Users/chanan/work/list_test_cli/maps/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52914:16)
at eval (/Users/chanan/work/list_test_cli/maps/app/components/map/import.js:3:44)
at instantiateModule (file:///Users/chanan/work/list_test_cli/maps/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)
Additional information
If the import is changed to only import Viewer then that too fails:
Internal server error: [vite] The requested module 'mapillary-js' does not provide an export named 'Viewer'
at analyzeImportedModDifference (file:///Users/chanan/work/list_test_cli/maps/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52053:15)
at nodeImport (file:///Users/chanan/work/list_test_cli/maps/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:53060:5)
at ssrImport (file:///Users/chanan/work/list_test_cli/maps/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52914:16)
at eval (/Users/chanan/work/list_test_cli/maps/app/components/map/index.tsx:7:31)
at instantiateModule (file:///Users/chanan/work/list_test_cli/maps/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapillary/mapillary-js
-
Missing tooltips Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mapillary/mapillary-js#639 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
mapillary/mapillary-js#638 ·
-
Transition mode Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mapillary/mapillary-js#633 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
mapillary/mapillary-js#618 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mapillary/mapillary-js#617 ·
All issues in mapillary/mapillary-js
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·