Trying to setup vector tiles server with static image support. Referring and

While trying to install tileserver-gl command in my mac machine and in a centos machine, met below err. (alignment is not easy here ?)

npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact for more info.
npm WARN lifecycle @mapbox/mapbox-gl-native@3.5.4~preinstall: cannot run in wd %s %s (wd=%s) @mapbox/mapbox-gl-native@3.5.4 npm install node-pre-gyp /usr/local/lib/node_modules/.staging/@mapbox/mapbox-gl-native-74bf2b00
/usr/local/bin/tileserver-gl -> /usr/local/lib/node_modules/tileserver-gl/src/main.js

> sqlite3@3.1.13 install /usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

[sqlite3] Success: "/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node" is installed via remote

> @mapbox/mapbox-gl-native@3.5.4 install /usr/local/lib/node_modules/tileserver-gl/node_modules/@mapbox/mapbox-gl-native
> node-pre-gyp install --fallback-to-build=false || make node

[@mapbox/mapbox-gl-native] Success: "/usr/local/lib/node_modules/tileserver-gl/node_modules/@mapbox/mapbox-gl-native/lib/mapbox_gl_native.node" is installed via remote

> canvas@1.6.8 install /usr/local/lib/node_modules/tileserver-gl/node_modules/canvas
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/rajavelu-1469/.node-gyp/6.11.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/tileserver-gl/node_modules/canvas/.node-gyp"
./util/ line 31: pkg-config: command not found
gyp: Call to './util/ freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/tileserver-gl/node_modules/canvas
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
└── (empty)

npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "tileserver-gl"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10

npm ERR! canvas@1.6.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the canvas@1.6.8 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs canvas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rajavelu-1469/npm-debug.log
npm ERR! code 1

asked 06 Mar '18, 08:07

Rajavelu_M's gravatar image

accept rate: 33%

edited 07 Mar '18, 08:51

scai's gravatar image

scai ♦

Also tried in centos machine & got following error, any idea?


Starting tileserver-gl v2.3.1

No MBTiles specified, using india.mbtiles

Automatically creating config file for india.mbtiles

Run with --verbose to see the config file here.


throw err;

Error: Cannot find module '../build/Release/sharp.node'

at Function.Module._resolveFilename (module.js:469:15)

at Function.Module._load (module.js:417:25)

at Module.require (module.js:497:17)

at require (internal/module.js:20:19)

at Object.<anonymous> (/usr/lib/node_modules/tileserver-gl/node_modules/sharp/lib/constructor.js:9:15)

at Module._compile (module.js:570:32)

at Object.Module._extensions..js (module.js:579:10)

at Module.load (module.js:487:32)

at tryModuleLoad (module.js:446:12)

at Function.Module._load (module.js:438:3)
(08 Mar '18, 10:47) Rajavelu_M
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Mar '18, 08:07

question was seen: 823 times

last updated: 08 Mar '18, 10:49

powered by OSQA