brunob / earthquake

A simple map for Kosmtik.
Creative Commons Zero v1.0 Universal
7 stars 3 forks source link

fail on a new install of kosmtik #1

Closed Fil closed 8 years ago

Fil commented 8 years ago
Shape Plugin: shapefile '/Users/fil/Sites/kosmtik/earthquake/http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/cultural/10m-admin-0-countries.zip.shp' does not exist encountered during parsing of layer 'countries' in Layer

missing a plugin maybe?

brunob commented 8 years ago

Surely, i've got all plugins enabled, the one you are missing may be https://github.com/kosmtik/kosmtik-fetch-remote :)

Fil commented 8 years ago

ok after node index.js plugins --install kosmtik-fetch-remote it loads the remote shp etc, but still no map:

[httpserver] /earthquake/tile/1/1/0.png?t=1454076958541 500
Trace
    at ProjectServer.raise (/Users/fil/Sites/kosmtik/src/back/ProjectServer.js:239:13)
    at /Users/fil/Sites/kosmtik/src/back/ProjectServer.js:73:34
    at /Users/fil/Sites/kosmtik/src/back/MetatileBasedTile.js:44:45
    at FSReqWrap.oncomplete (fs.js:82:15)
Invalid index file
Fil commented 8 years ago

full log before that:

isotype:earthquake fil$ node ../index.js  serve project.mml 
[Core] Loading config from /Users/fil/.config/kosmtik.yml
[Core] Loading plugin from ../plugins/base-exporters/index.js
[Core] Loading plugin from ../plugins/hash/index.js
[Core] Loading plugin from ../plugins/local-config/index.js
[Core] Loading plugin from ../plugins/datasource-loader/index.js
[Core] Loading plugin from kosmtik-fetch-remote
[Core] Loading project from project.mml
[Core] PreviewServer started, you can browse http://127.0.0.1:6789
[Local Config] Unable to load local config from /Users/fil/Sites/kosmtik/earthquake/localconfig.js
[Error: File not found: /Users/fil/Sites/kosmtik/earthquake/localconfig.js]
[Fetch Remote] Processing file http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/cultural/10m-admin-0-countries.zip
[Fetch Remote] New file for layer countries => /Users/fil/Sites/kosmtik/earthquake/data/countries/countries
[Fetch Remote] File already exists and not force mode /Users/fil/Sites/kosmtik/earthquake/data/countries/10m-admin-0-countries.zip SKIPPING
[Fetch Remote] Processing file http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/physical/10m-bathymetry.zip
[Fetch Remote] New file for layer bathymetry => /Users/fil/Sites/kosmtik/earthquake/data/bathymetry/bathymetry
[Fetch Remote] File already exists and not force mode /Users/fil/Sites/kosmtik/earthquake/data/bathymetry/10m-bathymetry.zip SKIPPING
[Fetch Remote] Processing file http://svt.tice.ac-orleans-tours.fr/php5/SIG/dossiers/sig_local/data/volcans/volcans.zip
[Fetch Remote] New file for layer volcans => /Users/fil/Sites/kosmtik/earthquake/data/volcans/volcans
[Fetch Remote] File already exists and not force mode /Users/fil/Sites/kosmtik/earthquake/data/volcans/volcans.zip SKIPPING
[Fetch Remote] Processing file http://tiles.kupaia.fr/IMG/zip/plat_lin.zip
[Fetch Remote] New file for layer plaques => /Users/fil/Sites/kosmtik/earthquake/data/plaques/plaques
[Fetch Remote] File already exists and not force mode /Users/fil/Sites/kosmtik/earthquake/data/plaques/plat_lin.zip SKIPPING
[Fetch Remote] Done.
[Core] Generating Mapnik XML…
[Core] Using mapnik version 3.0.0
[Core] Loading map…
[Core] Map ready
[Core] Loading map…
[Core] Map ready
brunob commented 8 years ago

Ok, i've just updated my kosmtik copy and now i get the same error :\ Invalid index file

yohanboniface commented 8 years ago

Works for me :s @Fil which node version?

Fil commented 8 years ago

node -v v5.1.1

-- Fil

On Fri, Jan 29, 2016 at 3:40 PM, Yohan Boniface notifications@github.com wrote:

Works for me :s @Fil https://github.com/Fil which node version?

— Reply to this email directly or view it on GitHub https://github.com/brunob/earthquake/issues/1#issuecomment-176787438.

yohanboniface commented 8 years ago

Erf, NodeJS… OK, let me investigate a bit.

yohanboniface commented 8 years ago

Can you try changing your mapnik version? So once in kosmtik directory, type:

npm install mapnik@3.4.9

This very version (3.4.7 does not work, latest 3.4.16 neither). Welcome to NodeJS world…

Dunno what's going on, but if it fixes for you, we can proceed for now and I'll investigate further later.

Fil commented 8 years ago

no luck installing this version of mapnik fails npm-debug.log.txt

brunob commented 8 years ago

Nice catch @yohanboniface it works well with mapnik@3.4.9 :)

Fil commented 8 years ago

I somewhat randomly tried with npm install mapnik@3.4.11 and it worked!

capture d ecran 2016-01-29 16 30 07

yohanboniface commented 8 years ago

OK, thanks for the confirmation. I'll investigate further.

brunob commented 8 years ago

Since the bug comes from mapnik, maybe we can close the issue ? I let @Fil and @yohanboniface decide...

yohanboniface commented 8 years ago

It may be on kosmtik still. But I can open one there instead ;)

Fil commented 8 years ago

You are free to go fishing after you add this to the readme: node index.js plugins --install kosmtik-fetch-remote

Fil commented 8 years ago

we have a FAIL with mapnik@3.4.14 too

yohanboniface commented 8 years ago

@brunob: Something does not turn to me: you told me on IRC you had 3.4.16 installed, but kosmtik package.json only point to 3.4.7, did you install it by hand?

brunob commented 8 years ago

@yohanboniface nope, i did the install like said in kosmtik readme, i've found this info in node_modules/mapnik/package.json

yohanboniface commented 8 years ago

Can one of you check with latest patch (3.4.17, not 3.5.0 yet)? Works for me :)

Cf kosmtik/kosmtik#107

Fil commented 8 years ago

cd ~/Sites/kosmtik ; rm -rf node_modules && npm install && node index.js plugins --install kosmtik-fetch-remote

and it works like a charm.

there is only a warning:

npm WARN deprecated graceful-fs@2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
brunob commented 8 years ago

@yohanboniface (y)

Fil commented 8 years ago

No need to install manually after #2 and https://github.com/kosmtik/kosmtik/pull/133

brunob commented 8 years ago

\o/ great, i'll update the readme after #2 merge.