Skip to content

After bumping some dependency versions, every instruction step is "[object Object]" #358

Open
@jude

Description

@jude

I made the following changes to package.json. After this point, each instruction steps is displayed as "[object Object]":

diff --git a/package.json b/package.json
index 5f83d58..26fca16 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
   "scripts": {
     "test": "eslint src/*.js i18n/*.js",
     "replace": "node ./scripts/replace.js",
-    "compile": "browserify -d src/index.js -s osrm > bundle.raw.js && uglifyjs bundle.raw.js -c -m --source-map=bundle.js.map -o bundle.js",
+    "compile": "browserify -d src/index.js -s osrm > bundle.raw.js && uglifyjs bundle.raw.js -c -m --source-map \"filename=bundle.js.map\" -o bundle.js",
     "build": "npm run replace && npm run compile && cp node_modules/leaflet/dist/leaflet.css css/leaflet.css",
     "start-index": "budo src/index.js --serve=bundle.js --live -d | bistre",
     "start": "npm run build && npm run start-index",
@@ -29,18 +29,20 @@
     "bistre": "^1.0.1",
     "browserify": "^14.3.0",
     "budo": "^9.4.0",
-    "uglify-js": "^2.8.0"
+    "uglify-js": "^3.17.4"
   },
   "dependencies": {
     "file-saver": "^1.3.8",
     "jsonp": "^0.2.0",
     "jxon": "^2.0.0-beta.5",
-    "leaflet": "~0.7.7",
-    "leaflet-control-geocoder": "~1.2.1",
-    "leaflet-routing-machine": "~3.1.0",
-    "leaflet.locatecontrol": "~0.44.0",
+    "leaflet": "~1.9.3",
+    "leaflet-control-geocoder": "~2.4.0",
+    "leaflet-routing-machine": "~3.2.12",
+    "leaflet.locatecontrol": "~0.79.0",
     "local-storage": "^1.4.2",
-    "osrm-text-instructions": "~0.13.0",
-    "qs": "^6.1.0"
+    "osrm-text-instructions": "~0.14.0",
+    "qs": "^6.1.0",
+    "maplibre-gl": "^2.4.0",
+    "@maplibre/maplibre-gl-leaflet": "~0.0.18"
   }
 }

I fixed this by commenting out the block at at https://github.com/Project-OSRM/osrm-frontend/blob/gh-pages/src/index.js#L158-L168.

Maybe one of the module updates addressed whatever led to the block being added originally ?

Note I've only looked at the instructions in English so maybe this block is still needed for i18n support.

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