Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install failing #11

Open
abdullahsumbal opened this issue Jul 15, 2019 · 11 comments
Open

npm install failing #11

abdullahsumbal opened this issue Jul 15, 2019 · 11 comments

Comments

@abdullahsumbal
Copy link

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.

@georgbachmann
Copy link

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

@abdullahsumbal
Copy link
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.

@georgbachmann
Copy link

georgbachmann commented 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
Copy link
Author

abdullahsumbal commented 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
Copy link

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

@JamJar00
Copy link

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.

@anneb
Copy link

anneb commented 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:

nvm install v6.17.1
rm -rf node_modules
npm install
node generate.js

@systemed
Copy link

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
Copy link

jvolker commented Apr 13, 2021

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

@freeseus
Copy link

freeseus commented 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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants