New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart yields errors on npm install #78

Closed
bairj opened this Issue Oct 15, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@bairj
Copy link

bairj commented Oct 15, 2018

Ubuntu 18.04, Node.JS v8.12.0, npm 6.4.1, Kernel: 4.15.0-36-generic

npm log attached.

Commands:

git clone https://github.com/kartotherian/kartotherian.git
cd kartotherian
npm install

Output:

npm WARN deprecated sphericalmercator@1.0.5: This module is now under the @mapbox namespace: install @mapbox/sphericalmercator instead
npm WARN deprecated queue-async@1.0.7: renamed to d3-queue
npm WARN deprecated protozero@1.5.1: protozero should no longer be used via npm, install instead via https://github.com/mapbox/mason
npm WARN deprecated maki@0.5.0: maki is now namespaced, install @mapbox/maki instead
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated kad-memstore@0.0.1: Please upgrade to @kadenceproject/kadence - See https://kadence.github.io
npm WARN deprecated kad-fs@0.0.4: Please upgrade to @kadenceproject/kadence - See https://kadence.github.io

canvas@1.6.13 install /home/user/projects/kartotherian/node_modules/canvas
node-gyp rebuild

./util/has_lib.sh: 31: ./util/has_lib.sh: pkg-config: not found
gyp: Call to './util/has_lib.sh 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/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-36-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/projects/kartotherian/node_modules/canvas
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN tilelive-tmstyle@0.8.0 requires a peer of @mapbox/tilelive-vector@>=2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas@1.6.13 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@1.6.13 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-10-15T18_37_17_984Z-debug.log

2018-10-15T18_37_17_984Z-debug.log

@mdholloway

This comment has been minimized.

Copy link
Member

mdholloway commented Oct 26, 2018

./util/has_lib.sh: 31: ./util/has_lib.sh: pkg-config: not found

Mind doing sudo apt-get install -y pkg-config libcairo2-dev libjpeg-dev libgif-dev and retrying? I think that should get you up and running. If so, I'll update the docs.

@Phyks

This comment has been minimized.

Copy link

Phyks commented Dec 17, 2018

@mdholloway Indeed, that solved the issue for me. I then had an issue with mapnik-config not found, solved by sudo apt-get install -y libmapnik-dev.

Finally, I had an issue with the build step in mapnik. Looks like I was using a Node > 8 which was an issue, Node v8 works fine!

Thanks for the useful tips :)

@Phyks

This comment has been minimized.

Copy link

Phyks commented Dec 17, 2018

Actually, when running the server, I got an issue from node_modules/@kartotherian/snapshot/lib/autoPosition.js. The line just before the line 21 ends with a comma while (I think) it should end with a ;. Changing this, the server starts correctly.

EDIT: Btw, I had issues with yarn as well. npm is safe and works.

mdholloway added a commit to mdholloway/kartotherian that referenced this issue Jan 2, 2019

@mdholloway mdholloway referenced this issue Jan 2, 2019

Merged

Update README #82

@mdholloway

This comment has been minimized.

Copy link
Member

mdholloway commented Jan 3, 2019

The autoPosition.js typo was fixed in #80 and the docs were updated in #82. Thanks to @Phyks for the reports!

(Btw, if the yarn issue is still present, please feel free to open a new issue and elaborate a bit more on the problem.)

@mdholloway mdholloway closed this Jan 3, 2019

@Phyks

This comment has been minimized.

Copy link

Phyks commented Jan 4, 2019

Thanks! I'll open a new issue for the yarn issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment