I have a new ubuntu 17.10 server that Im building an Open Streetmap Server on. I installed carto and am now getting this error:

    osm@atlantageek-System-Product-Name:~/openstreetmap-carto-2.41.0$ carto project.mml > style.xml
    if (mapnik_reference.version.hasOwnProperty(version)) {

TypeError: Cannot read property 'hasOwnProperty' of undefined
    at Object.ref.setVersion (/usr/lib/nodejs/carto/lib/carto/tree/reference.js:19:33)
    at /usr/lib/nodejs/carto/lib/carto/tree/reference.js:209:5
    at Object.<anonymous> (/usr/lib/nodejs/carto/lib/carto/tree/reference.js:213:3)
    at Module._compile (module.js:570:32)
    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)

Im running node 8.2.1

  • 1
    and how did you solve it finally?
    – sepehr
    Commented Jul 13, 2018 at 9:06

1 Answer 1


I had a similar issue but with carto-vl not receiving the correct stats data from windshaft. Mine was solved by adding layerStats: true to the bottom of my windshaft config (windshaft-folder/config/environments/development.js)

E.g: ,enabledFeatures: { ... layerStats: true, ... }

It seems this used to be an optional flag that some clients now require (unfortunately this doesn't seem to be mentioned in any upgrade guides, so I had to dig around in code a bit)

Without more knowledge of how you installed, your issue may well be different.

Hope that helps!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.