gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.51k stars 811 forks source link

DeprecationWarning: Invalid 'main' field in + Styles do not match layer selector #4925

Closed simwin closed 5 months ago

simwin commented 5 months ago
git clone https://github.com/gravitystorm/openstreetmap-carto
cd openstreetmap-carto
carto -v
1.2.0
carto project.mml > mapnik.xml
Warning: style/admin.mss:24:19 Styles do not match layer selector #admin-low-zoom.
Warning: style/admin.mss:23:19 Styles do not match layer selector #admin-low-zoom.
Warning: style/admin.mss:22:18 Styles do not match layer selector #admin-low-zoom.
Warning: style/admin.mss:18:6 Styles do not match layer selector #admin-low-zoom.
node:75557) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/share/node_modules/chroma-js/package.json' of 'chroma.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:75557) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/share/node_modules/chroma-js/package.json' of 'chroma.js'. Please either fix that or report it to the module author
imagico commented 5 months ago

Thanks for the report.

The first are warnings indicating the way we write the style rules leads to certain rules never being applied to layer admin-low-zoom. That is not a problem because carto detects that (as illustrated by the warning) and does not generate style rules for these (if you look at the xml code you will see there is no admin-low-zoom-firstline).

These warnings simply result from us - for reasons of code maintainability - using the same mss code to style the low, mid and high zoom layers.

The second is a problem of carto, not OSM-Carto, probably the result of chroma.js having changed something and carto (which is unmaintained for several years now) not having adjusted to that.

Closing as not being an issue of this project.