Skip to content

Cannot find module 'node_modules/@mapbox/mapbox-sdk/services/geocoding' #497

@falk-stefan

Description

@falk-stefan

Locally, everything is working fine. I have an express server which uses the mapbox geocoding API for text-based location search.

I have the following installed in my package.json

  "dependencies": {
    "@mapbox/mapbox-sdk": "^0.16.1",
  },
  "devDependencies": {
    "@types/mapbox__mapbox-sdk": "^0.16.0",
  }

and this entry in my tsconfig.json:

    "types": [
      "jest",
      "@types/mapbox__mapbox-sdk"
    ]

However, as I run the server in production, I am getting this error:

Cannot find module '/node_modules/@mapbox/mapbox-sdk/services/geocoding' imported from /src/api/search/map-search.controller.js

mapbox is the only package which does not appear to work here. Note, that I am using TypeScript throughout my application here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions