node-osmium
node-osmium copied to clipboard
Building with Node.js 20
I wanted to get this working on Node.js 20.11.0. I think I'm most of the way there with 23f80d4490cc0bdb59b4d9e19540406cb614100a.
Not directly because of Node.js 20, but because osm-testdata no longer has a 1.0.0 release I've had to add a specific commit reference to it in package.json:
"osm-testdata": "github:osmcode/osm-testdata#ecfdeb0d5ffcfcb60939651d517d5d7d1bb041a3",
That doesn't work so well with the npm install section of the Makefile, so I've had to amend it from:
./node_modules: ./node_modules/node-pre-gyp
npm install `node -e "console.log(Object.keys(require('./package.json').dependencies).join(' '))"` \
`node -e "console.log(Object.keys(require('./package.json').devDependencies).join(' '))"` --clang=1
to this:
./node_modules: ./node_modules/@mapbox/node-pre-gyp
npm install
I'm a bit confused by what the --clang=1 part does. I can't find any npm install documentation referring to it. If I put it back in it tries to build everything and his dog in terms of node modules (zmq, mdns2, etc.). It seems to build fine without it, although I've not yet tested it.