Open eduboxgithub opened 4 years ago
Same here - it's failing for me with:
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.6.2/node-v72-linux-x64-Release.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for mapnik@3.6.2 and node@12.16.3 (node-v72 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.6.2/node-v72-linux-x64-Release.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for mapnik@3.6.2 and node@12.16.3 (node-v72 ABI) (falling back to source compile with node-gyp)
When attempting to visit the AWS link directly, I get:
Managed it with a really old version of node (using nvm
to manage node versions):
nvm install 6.17.1
nvm use 6.17.1
npm install -g @mapbox/spritezero-cli
and at this point you should be able to spritezero [output] [input]
.
In the process, I realized that this is actually an upstream issue with mapnik
- they host prebuilt C++ modules on AWS, but haven't built these for node since v6 (!)
I was able to build mapnik.node
, but have no idea how to "link" against it when installing @mapbox/spritezero-cli
. (Also very confused that mapnik's node bindings apparently go to version 4.4.0, but their documentation only goes to version 3.6.)
It also works with node version 8.17... Any other version above this one will reproduce the initial error...
Had the same problem on Linux (fedora 34). But the workaround with this prehistoric node version worked.
any update on this?
I tried an older version of node but it gave me this error:
/myProject/node_modules/@mapbox/spritezero/lib/generate.js:136
...img,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/myProject/node_modules/@mapbox/spritezero/index.js:1:80)
And new node version still gives me the error, I try with node 6 and 16
EDIT: Using node 10.24.1 It's works.
I could install @mapbox/spritezero-cli
on my nodejs v18.16.0
$ node -v
v18.16.0
with the following:
npm -g install mapnik
npm -g install @mapbox/spritezero
Here are my packages:
$ npm list -g
├── @mapbox/mbtiles@0.12.1
├── @mapbox/mbview@5.1.0
├── @mapbox/spritezero@8.0.3
├── @mapbox/tilelive@6.1.1
├── corepack@0.17.0
├── eslint@8.53.0
├── json-stable-stringify@1.1.1
├── mapnik@4.5.9
├── mbgl@1.3.8
├── npm@9.5.1
├── requireg@0.2.2
├── tilelive-modules@0.4.2
├── tilelive-pgquery@1.5.0
└── tileserver-gl@4.6.5
Here's one possible solution - this is a fork of the library with a different engine which support any node version from 14.15: https://www.npmjs.com/package/@jutaz/spritezero
Can install it simply by running: npm i @jutaz/spritezero
Happy to answer any questions about it, if there are any.
I was using spritezero-cli but I think the CLI version is not up to date and have very old dependencies.. node 8 and a previues version of spritezero.
I'm trying to install spritezero and run it via a node script but I get this error:
I have visual studio 2019 community edition installed with the C++ libs.
Can someone help me out installing spritezero?