pelias / polylines

Pelias import pipeline for polyline (road network) data.
MIT License
17 stars 24 forks source link

Docker build fails #165

Closed Binternet closed 6 years ago

Binternet commented 6 years ago

docker build . is failing:

Step 13/15 : RUN npm install
 ---> Running in 326070c88796
npm WARN deprecated geojson-extent@0.3.2: This module has moved: please switch to @mapbox/geojson-extent
npm WARN deprecated polyline@0.2.0: This module is now under the @mapbox namespace: install @mapbox/polyline instead
npm WARN deprecated turf-line-distance@3.0.12: Turf packages are now namespaced: please use @turf/line-distance instead
npm WARN deprecated turf-along@3.0.12: Turf packages are now namespaced: please use @turf/along instead
npm WARN deprecated extent@0.2.0: This module is now under the @mapbox namespace: install @mapbox/extent instead
npm WARN deprecated geojson-normalize@0.0.0: This module is now under the @mapbox namespace: install @mapbox/geojson-normalize instead
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated turf-destination@3.0.12: Turf packages are now namespaced: please use @turf/destination instead
npm WARN deprecated turf-helpers@3.0.12: Turf packages are now namespaced: please use @turf/helpers instead
npm WARN deprecated turf-distance@3.0.12: Turf packages are now namespaced: please use @turf/distance instead
npm WARN deprecated turf-bearing@3.0.12: Turf packages are now namespaced: please use @turf/bearing instead
npm WARN deprecated turf-invariant@3.0.12: Turf packages are now namespaced: please use @turf/invariant instead

> git-validate@2.2.2 install /code/pelias/polylines/node_modules/git-validate
> node bin/install

WARNING: Unable to find a .git directory for this project, installation aborted.

> integer@1.0.3 install /code/pelias/polylines/node_modules/integer
> node tools/install

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:449:14)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:353:11
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:69:16)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Linux 4.4.0-1052-aws
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 /code/pelias/polylines/node_modules/integer
gyp ERR! node -v v6.13.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

npm ERR! Linux 4.4.0-1052-aws
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.13.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! integer@1.0.3 install: `node tools/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer@1.0.3 install script 'node tools/install'.
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 integer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node tools/install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs integer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls integer
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /code/pelias/polylines/npm-debug.log

The command '/bin/sh -c npm install' returned a non-zero code: 1
missinglink commented 6 years ago

The relevant part of this stacktrace is Failed at the integer@1.0.3 which we have seen before in other repos.

The issue here is that the maintainer of npm integer changed the way the module is built, now requiring python and basic build utils such as make in order to install the npm module.

We decided to fix this across all repos by updating pelias/baseimage (the image all other pelias docker images inherit from), this change was landed in https://github.com/pelias/baseimage/pull/4 11 days ago.

Please pull the latest version of the pelias/baseimage image from dockerhub and rebuild.

missinglink commented 6 years ago

You can see a history of all image builds here https://hub.docker.com/r/pelias/baseimage/tags/ (including builds for branches and other dev code), the one you want is latest.

docker pull pelias/baseimage:latest
latest: Pulling from pelias/baseimage
Digest: sha256:7cbc95d3814322d3a8d84a0ff33d7481f5db2457c084777ac2373d49718ff529
Status: Image is up to date for pelias/baseimage:latest
orangejulius commented 6 years ago

I'm glad you reported this @Binternet because I don't think we had considered the fact that baseimage updates will not automatically be surfaced to other developers. It's fairly expected that a developer would run git pull to make sure they have the latest code changes, but we should probably get used to sending out a note when the baseimage changes.

Binternet commented 6 years ago

@orangejulius You're welcome, on that note - I wish to thank you for your work and patience, you're doing a great job!

missinglink commented 6 years ago

can we close this issue?

Binternet commented 6 years ago

Sure! thanks