Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

202
Vistas
Carto raises TypeError: Cannot read property 'hasOwnProperty' of undefined

I have been following this tutorial: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/

and got stuck on running

carto project.mml > mapnik.xml

My goal is to set OSM server - so expected behaviour of carto is compiling project.mml into "ready-to-render" mapnik.xml.

Actual behaviour is like the following: Carto raises error:

ubuadmin@klab-osm:~/src/openstreetmap-carto$ carto -v
/usr/lib/nodejs/carto/lib/carto/tree/reference.js:19
    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:34)
    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 (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)

I am aware of this Github Issue: https://github.com/gravitystorm/openstreetmap-carto/issues/3409 and this SO question: TypeError: Cannot read property 'hasOwnProperty' of undefined node-carto but haven't found them helpful.

I am working on Ubuntu 20.04 Focal Fossa, mapnik version is 0.1, I am unable to check carto version due to error mentioned above.

Trick is, because of company policy the machine I am working on is not (and won't be) connected to the Internet - I log in via SSH. Because of that I installed carto using sudo apt install nodejs-carto insted of npm install -g carto - the company has mirror on Ubuntu repository inside intranet.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Aparently, the problem was carto version being too low - after updating to carto@1.2.0 the issue disappeared.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda