-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
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:
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.4.0/node-v72-win32-x64-Release.tar.gz
node-pre-gyp WARN Pre-built binaries not found for mapnik@4.4.0 and node@12.14.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
'mapnik-config' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'mapnik-config --ldflags' returned exit status 1 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 (C:\Users\hsantos\AppData\Roaming\nvm\v12.14.0\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\hsantos\\AppData\\Roaming\\nvm\\v12.14.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configu
re" "--fallback-to-build" "--module=D:\\_DESKTOP\\Sinaletica\\node_modules\\mapnik\\lib\\binding\\mapnik.node" "--module_name=mapnik" "--module_path=D:\\_DESKTOP\\Sinaletica\\node_modules\\mapnik\\lib\\binding" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72" "--msvs_version=2017"
gyp ERR! cwd D:\_DESKTOP\Sinaletica\node_modules\mapnik
gyp ERR! node -v v12.14.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\hsantos\AppData\Roaming\nvm\v12.14.0\node_modules\npm\node_modules\node-gyp\bin\node-g
yp.js configure --fallback-to-build --module=D:\_DESKTOP\Sinaletica\node_modules\mapnik\lib\binding\mapnik.node --module_name=mapnik --module_path=D:\_DESKTOP\Sinaletica\node_modules\mapnik\lib\binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --msvs_version=2017' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (D:\_DESKTOP\Sinaletica\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\_DESKTOP\\Sinaletica\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\_DESKTOP\Sinaletica\node_modules\mapnik
node-pre-gyp ERR! node -v v12.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\hsantos\AppData\Roaming\nvm\v12.14.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\_DESKTOP\Sinaletica\node
_modules\mapnik\lib\binding\mapnik.node --module_name=mapnik --module_path=D:\_DESKTOP\Sinaletica\node_modules\mapnik\lib\binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --msvs_version=2017' (1)
npm WARN assets-sinaletica@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mapnik@4.4.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mapnik@4.4.0 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! C:\Users\hsantos\AppData\Roaming\npm-cache\_logs\2020-07-03T12_22_46_075Z-debug.log
I have visual studio 2019 community edition installed with the C++ libs.
Can someone help me out installing spritezero?
geraintanderson, erdmann040, kasi1999999 and michaelkirk
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]Erro installing spritezero[/-][+]Error installing spritezero[/+]candu commentedon Jul 9, 2020
Same here - it's failing for me with:
When attempting to visit the AWS link directly, I get:
candu commentedon Jul 9, 2020
Managed it with a really old version of node (using
nvm
to manage node versions):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.)eduboxgithub commentedon Jul 10, 2020
It also works with node version 8.17... Any other version above this one will reproduce the initial error...
erdmann040 commentedon Jul 13, 2021
Had the same problem on Linux (fedora 34). But the workaround with this prehistoric node version worked.
jampueroc commentedon Jan 6, 2023
any update on this?
I tried an older version of node but it gave me this error:
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.
nmcdtu commentedon Jan 24, 2024
I could install
@mapbox/spritezero-cli
on my nodejs v18.16.0with the following:
Here are my packages:
jutaz commentedon Jun 20, 2024
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.