Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Installation issue #1264

Open
Myzel394 opened this issue Feb 11, 2022 · 14 comments
Open

Installation issue #1264

Myzel394 opened this issue Feb 11, 2022 · 14 comments

Comments

@Myzel394
Copy link

I'm currently trying to install the dependencies.

Node: v12.22.10
npm: 7.24.2
os: MacOs Montery 12.1

I installed mapnik using homebrew

Log:

npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated samsam@1.3.0: This package has been deprecated in favour of @sinonjs/samsam
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code 1
npm ERR! path /Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CXX(target) Release/obj.target/mapnik/src/mapnik_logger.o
npm ERR!   CXX(target) Release/obj.target/mapnik/src/node_mapnik.o
npm ERR! Failed to execute '/Users/myzel394/.nvm/versions/node/v12.22.10/bin/node /Users/myzel394/.nvm/versions/node/v12.22.10/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.1
npm ERR! node-pre-gyp info using node@12.22.10 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/lib/binding/mapnik.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.5.6/Release/darwin-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 403 Forbidden on https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.5.6/Release/darwin-arm64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for mapnik@4.5.6 and node@12.22.10 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 403 Forbidden on https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.5.6/Release/darwin-arm64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@12.22.10 | darwin | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@12.22.10 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.10 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/myzel394/.nvm/versions/node/v12.22.10/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/common.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/myzel394/.nvm/versions/node/v12.22.10/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/myzel394/Library/Caches/node-gyp/12.22.10/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/myzel394/Library/Caches/node-gyp/12.22.10',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/myzel394/.nvm/versions/node/v12.22.10/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/myzel394/Library/Caches/node-gyp/12.22.10/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@12.22.10 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/node_mapnik.cpp:7:
npm ERR! In file included from ../src/mapnik_vector_tile.hpp:7:
npm ERR! In file included from ../../mapnik-vector-tile/src/vector_tile_merc_tile.hpp:5:
npm ERR! ../../mapnik-vector-tile/src/vector_tile_tile.hpp:11:10: fatal error: 'mapnik/geometry/box2d.hpp' file not found
npm ERR! #include <mapnik/geometry/box2d.hpp>
npm ERR!          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/mapnik/src/node_mapnik.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/myzel394/.nvm/versions/node/v12.22.10/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "/Users/myzel394/.nvm/versions/node/v12.22.10/bin/node" "/Users/myzel394/.nvm/versions/node/v12.22.10/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/lib/binding/mapnik.node" "--module_name=mapnik" "--module_path=/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
npm ERR! gyp ERR! cwd /Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik
npm ERR! gyp ERR! node -v v12.22.10
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/myzel394/.nvm/versions/node/v12.22.10/bin/node /Users/myzel394/.nvm/versions/node/v12.22.10/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/myzel394/VSCodeProjects/erdapfel/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1022:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.2.0
npm ERR! node-pre-gyp ERR! command "/Users/myzel394/.nvm/versions/node/v12.22.10/bin/node" "/Users/myzel394/VSCodeProjects/erdapfel/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/myzel394/VSCodeProjects/erdapfel/node_modules/mapnik
npm ERR! node-pre-gyp ERR! node -v v12.22.10
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.1
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myzel394/.npm/_logs/2022-02-11T07_33_01_935Z-debug.log
@Myzel394
Copy link
Author

Seems to be an issue specific to MacOS, since I it doesn't occur on my Linux machine.

However, I don't know where to place the config. Is it supposed to go into config/config.yml or config.yml? Both paths do not work, where should I place the config?

@Myzel394
Copy link
Author

@fatal69100 maybe you could take a look at this

@Myzel394
Copy link
Author

Okay seems like you don't need to copy the files and create a separate config.yml, the config/default-config.yml is enough.
Now I'm facing the issue of not having an own tile server.

@fatal69100 can you help me out on this? Can't I simply use some OSM/QwantMaps/Apple Maps tiles? I just wanna develop on the frontend.

@Myzel394
Copy link
Author

Currently trying https://wiki.openstreetmap.org/wiki/Tiles#Base_maps but can't get them running

@sdrll
Copy link
Contributor

sdrll commented Feb 12, 2022

Hi @Myzel394, thank you for your interest in the project.
We have a repository that to install a tile server with docker : https://github.com/Qwant/kartotherian_docker. You can import only Luxembourg data to limit your local resources.
I hope it helps.

@Myzel394
Copy link
Author

Thanks for your help.

I have now loaded the tiles and started the containers using kathotherian_docker. However, I don't know what to pass as the TILEVIEW_mapStyle_baseMapUrl and TILEVIEW_mapStyle_poiMapUrl variables. Could you help me out on this?

@Myzel394
Copy link
Author

Any news @fatal69100? Really would like to contribute to this :)

@sdrll
Copy link
Contributor

sdrll commented Feb 16, 2022

According to the docker_kartotherian documentation : Once all tiles are generated, the map is visible on http://localhost:8585! (If not, take a look at docker ps and see what the port of the image qwantresearch/erdapfel is.)
I advise you to check with docker ps with port is used by the tile server and fill this config as following :
TILEVIEW_mapStyle_baseMapUrl='["http://your-server/path-to-basemap-tiles/{z}/{x}/{y}.pbf"]' \ TILEVIEW_mapStyle_poiMapUrl='["http://your-server/path-to-poi-tiles/{z}/{x}/{y}.pbf"]' \

@Myzel394
Copy link
Author

The docker container image is working fine, but I don't know the correct URL

http://your-server/path-to-basemap-tiles/{z}/{x}/{y}.pbf <- What's the correct url?

@sdrll
Copy link
Contributor

sdrll commented Feb 17, 2022

Sorry, it should be : TILEVIEW_mapStyle_baseMapUrl='["http://localhost:6533/ozbasemap/{z}/{x}/{y}.pbf"]' \ TILEVIEW_mapStyle_poiMapUrl='["http://localhost:6533/ozpoi/{z}/{x}/{y}.pbf"]' \

@Myzel394
Copy link
Author

Myzel394 commented Feb 17, 2022

Thanks @fatal69100

Unfortunately, I'm getting only 400 Bad requests with "Unknown source" as the message. I tried moving around the map, but seems like no tile returns anything. Do you know how to fix this?

@sdrll
Copy link
Contributor

sdrll commented Feb 18, 2022

As you can see on the screenshoot taken form localhost:8585 (erdapfel run within kartotherian_docker)
Screenshot from 2022-02-18 09-41-36
You can see which URL is called when you zoom in/out on the map to display data (e.g. http://localhost:6533/ozbasemap/5/16/11.pbf on the picture), it should be the same URL when you run Edapfel yourself without kartotherian_docker

@Myzel394
Copy link
Author

Myzel394 commented Feb 18, 2022

@fatal69100 The url is indeed called, however no response results in 200, instead all calls are rejected with a 400 status code.

Here's a short video demonstrating the problem:

2022-02-18.15-58-02.mp4

@Myzel394
Copy link
Author

Any news on that? @fatal69100 can you help me out or pass it to someone else?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants