You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after cloning the repo, npm install throws this error for me:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(24
1,5): error MSB8066: Custom build for '..\scripts\install_deps.sh' exited with code 1. [D:\code\node-fontnik\build\acti
on_before_build.vcxproj]"
On Win 10, Node v16.7
I have installed Visual Studio 2019 (some basic stuff for C++) and "Microsoft.CppCommon.targets" does exist in that directory... but it's still throwing an error.
Thoughts? I'm sure there are others that have run into this...
Thanks for the discussion! I'll close this issue for now, but if you have anything else to add, please don't hesitate to leave a comment or open a new issue.
Activity
georgbachmann commentedon Aug 29, 2019
@abdullahsumbal Just tried the same. Changing the fontnik version did not work for me. Still have an error :(
Any ideas?
abdullahsumbal commentedon Aug 30, 2019
@georgbachmann, I just recloned and did npm install again. It works for me. Which operating system are you using?
I have a Ubuntu 16.04.6 LTS system with node v10.16.3 and npm v6.9.0.
georgbachmann commentedon Aug 30, 2019
I am on MacOS 10.14.6. Node V12.9.1 and npm 6.10.3
Is there a docker-version available somewhere as well? Couldn'd find one :(
abdullahsumbal commentedon Sep 7, 2019
Hey @georgbachmann, I dont have a Mac, so I can not test it. If you just need the generated fonts from this repo. I have put the generated fonts on this link https://abdullahsumbal.com/Doc/fonts.zip
georgbachmann commentedon Sep 9, 2019
@abdullahsumbal Thanks for your help, but I'd need my own fonts unfortunately...
JamJar00 commentedon Sep 11, 2019
Running
npm i fontnikhas fixed this for us.My npm-foo isn't great so I've not the faintest clue why it can't just resolve the package from the
package.lockfile but there you go.anneb commentedon Oct 19, 2019
openmaptiles/font uses fontnik. fontnik installs only with supported node versions. See https://github.com/mapbox/node-fontnik/blob/master/README.md for a list of supported node versions.
Build from source does not work because of a missing C++ flag somewhere
(-DBOOST_MATH_DISABLE_FLOAT128), see UCL/STIR#209
I was able to solve the problem by switching to node version 6.17.1:
systemed commentedon May 20, 2020
For the benefit of anyone trying to do this on a Mac... just don't. Spent way too many hours on it this afternoon.
I've installed it on an Ubuntu 16.04 VM and it works fine using @anneb's version suggestion.
jvolker commentedon Apr 13, 2021
It worked flawlessly for me on macOS Big Sur 11.2.3 and Node v14.15.4.
freeseus commentedon Apr 21, 2023
after cloning the repo, npm install throws this error for me:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(24
1,5): error MSB8066: Custom build for '..\scripts\install_deps.sh' exited with code 1. [D:\code\node-fontnik\build\acti
on_before_build.vcxproj]"
On Win 10, Node v16.7
I have installed Visual Studio 2019 (some basic stuff for C++) and "Microsoft.CppCommon.targets" does exist in that directory... but it's still throwing an error.
Thoughts? I'm sure there are others that have run into this...
freeseus commentedon Apr 21, 2023
Nevermind. Found a different solution.
For anyone looking to find an online conversion from a regular font (.TTF for example) to PBF, just use:
https://maplibre.org/font-maker/
Hope that's helpful.
LumiereDuMonde commentedon Apr 10, 2025
@freeseus or anyone trying this on Windows it is best to use WSL
If not installed:
wsl --installOnce installed and after a reboot, open a WSL terminal and setup dependencies:
Then just clone the repo, install and generate:
TomPohys commentedon Jul 27, 2026
Thanks for the discussion! I'll close this issue for now, but if you have anything else to add, please don't hesitate to leave a comment or open a new issue.