2

I am trying to install cartodb on ubuntu 12.04. I have done all the steps mentioned on https://github.com/CartoDB/cartodb and I am stuck at the Install Windshaft-cartodb Step. The following steps worked fine:

git clone git://github.com/CartoDB/Windshaft-cartodb.git
cd Windshaft-cartodb
git checkout master
npm install
cp config/environments/development.js.example config/environments/development.js 

Whenever I hit the command node app.js development, it gives me following error:

module.js:340 throw err; ^ Error: Cannot find module 'mapnik' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/indictrans/Documents/Windshaft-cartodb/node_modules/windshaft/lib/windshaft/server.js:8:21) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)

I installed mapnik using sudo apt-get install libmapnik libmapnik-dev mapnik-utils python-mapnik. I also tried npm install mapnikbut the problem still persists.

I have googled lot on this issue but each time it gave the same solution. I have also installed TileMill to map Mapnik dependecy but it is not working.

1

Judging from the error output you get the error is not with the system install of mapnik, but with the node dependency windshaft:

The source of the failing file: /home/indictrans/Documents/Windshaft-cartodb/node_modules/windshaft/lib/windshaft/server.js:8:21

has the following line:

, mapnik = require('mapnik')

Since this require fails for you it indicates that the windshaft's dependencies did not get install properly on the npm install command. The directory ./node_modules/windshaft/node_modules/mapnik/ should contain the mapnik node module files if everything went fine.

If I were you I would try to delete the ./node_modules directory and do a npm install again, make sure to use the required node version (v0.10).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.