Skip to content

npm install failing #11

Closed
Closed

Description

@abdullahsumbal

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.

Activity

  1. georgbachmann commented on Aug 29, 2019

    @georgbachmann

    @abdullahsumbal Just tried the same. Changing the fontnik version did not work for me. Still have an error :(
    Any ideas?

    1834 verbose stack Error: fontnik@0.5.3 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 fontnik@0.5.3
    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 fontnik@0.5.3 install: `node-pre-gyp install --fallback-to-build=true`
    1843 error Exit status 1
    1844 error Failed at the fontnik@0.5.3 install script.
    
  2. abdullahsumbal commented on Aug 30, 2019

    @abdullahsumbal
    Author

    @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.

  3. georgbachmann commented on Aug 30, 2019

    @georgbachmann

    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 :(

  4. abdullahsumbal commented on Sep 7, 2019

    @abdullahsumbal
    Author

    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

  5. georgbachmann commented on Sep 9, 2019

    @georgbachmann

    @abdullahsumbal Thanks for your help, but I'd need my own fonts unfortunately...

  6. JamJar00 commented on Sep 11, 2019

    @JamJar00

    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.

  7. anneb commented on Oct 19, 2019

    @anneb

    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
    
    
  8. systemed commented on May 20, 2020

    @systemed

    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.

  9. jvolker commented on Apr 13, 2021

    @jvolker

    It worked flawlessly for me on macOS Big Sur 11.2.3 and Node v14.15.4.

  10. freeseus commented on Apr 21, 2023

    @freeseus

    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...

  11. freeseus commented on Apr 21, 2023

    @freeseus

    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.

  12. LumiereDuMonde commented on Apr 10, 2025

    @LumiereDuMonde

    @freeseus or anyone trying this on Windows it is best to use WSL

    If not installed:
    wsl --install

    Once installed and after a reboot, open a WSL terminal and setup dependencies:

    sudo apt update
    sudo apt install -y build-essential curl git nodejs npm
    

    Then just clone the repo, install and generate:

    git clone https://github.com/openmaptiles/fonts.git
    cd fonts
    npm install
    node ./generate.js
    
  13. TomPohys commented on Jul 27, 2026

    @TomPohys
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions