1

Firstly, I ran the osrm-backend docker successfully. I validated its result with a few queries. Then, I tried to run the osrm-frontend docker using the steps provided in its repo. However, it fails due to a syntax error in Micromatch. the error is as follows:

/src/node_modules/micromatch/index.js:44
    let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
                                                   ^^^


SyntaxError: Unexpected token ...
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/src/node_modules/budo/lib/budo.js:6:15)
at Module._compile (module.js:570:32)

How can I fix it?

1
  • Just "error" is pretty vague. Can you edit the question to include a minimal reproducible example, making sure to include your application source code and any error messages in plain text? Commented Feb 11, 2024 at 13:54

1 Answer 1

1

The dockerfile has a low alpine version (3.5) and therefore installs a low nodejs version (6.19). changing the alpine version from 3.5 to 3.15 fixed the issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.