I am trying to install Tilestrata on a DigitalOcean server. I already have it up and running on an AWS instance. But although I think I'm doing the same thing I did to install it on AWS, so far I have been stymied in getting it running on DO by the following error:
safeuser@Server:~/tileserver$ node server.js
/home/safeuser/node_modules/tilestrata/lib/TileServer.js:499
var callback = function(err) { if (err) throw err; };
^
Error: Unable to initialize "basemap" layer: "expected < at line 1"
at /home/safeuser/node_modules/tilestrata/lib/TileServer.js:106:19
at /home/safeuser/node_modules/tilestrata/node_modules/async/lib/async.js:52:16
at done (/home/safeuser/node_modules/tilestrata/node_modules/async/lib/async.js:243:17)
at /home/safeuser/node_modules/tilestrata/node_modules/async/lib/async.js:44:16
at Object._onImmediate (/home/safeuser/node_modules/tilestrata/lib/TileRequestHandler.js:125:4)
at processImmediate [as _immediateCallback] (timers.js:330:15)
It seems like it's having issues with the Mapnik XML file, but I've checked the file and the route to the file, and it should be fine. It's the exact same project.xml file I'm using successfully on AWS. Here is the contents of my server.js file:
var tilestrata = require('tilestrata');
var disk = require('tilestrata-disk');
var mapnik = require('tilestrata-mapnik');
var dependency = require('tilestrata-dependency');
var strata = tilestrata();
// define layers
strata.layer('basemap')
.route('tile.png')
.use(disk.cache({dir: './tiles/basemap/'}))
.use(mapnik({
xml: './project/project.xml',
tileSize: 256,
scale: 1
}));
// start accepting requests
strata.listen(8080);
I must be missing something here, and I've been investigating for days. Any insights would be most welcome.