fonts
fonts copied to clipboard
npm install failing
I got this error message when running npm install
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.5.0/Release/node-v64-linux-x64.tar.gz
Changing npm package fontnik
version to v0.5.3
in the package.json
fixed the problem for me.
@abdullahsumbal Just tried the same. Changing the fontnik version did not work for me. Still have an error :( Any ideas?
1834 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build=true`
1834 verbose stack Exit status 1
1834 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:326:16)
1834 verbose stack at EventEmitter.emit (events.js:209:13)
1834 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
1834 verbose stack at ChildProcess.emit (events.js:209:13)
1834 verbose stack at maybeClose (internal/child_process.js:1021:16)
1834 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
1835 verbose pkgid [email protected]
1836 verbose cwd /Users/georgbachmann/Desktop/maps(cjsx8odu41loz1fjxg5t510eg)
1837 verbose Darwin 18.7.0
1838 verbose argv "/usr/local/Cellar/node/12.9.1/bin/node" "/usr/local/bin/npm" "install"
1839 verbose node v12.9.1
1840 verbose npm v6.10.3
1841 error code ELIFECYCLE
1842 error errno 1
1843 error [email protected] install: `node-pre-gyp install --fallback-to-build=true`
1843 error Exit status 1
1844 error Failed at the [email protected] install script.
@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.
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 :(
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
@abdullahsumbal Thanks for your help, but I'd need my own fonts unfortunately...
Running npm i fontnik
has 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.lock
file but there you go.
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:
nvm install v6.17.1
rm -rf node_modules
npm install
node generate.js
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.
It worked flawlessly for me on macOS Big Sur 11.2.3 and Node v14.15.4.
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...
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.