Code Monkey home page Code Monkey logo

puppeteer-heroku-buildpack-fonts's Introduction

puppeteer-heroku-buildback-fonts

Heroku buildpack adding missing fonts for jontewks/puppeteer-heroku-buildpack

This buildpack add 22MBs of fonts to the built Heroku slug size so it is not added by default.

It aims to support Chinese, Korean, and Japanese characters. If you are facing missing character sets, feel free to open a PR.

Usage

# clear cache and current buildpacks
heroku builds:cache:purge
heroku buildpacks:clear

# puppeteer
heroku buildpacks:add -i 1 jontewks/puppeteer

# fonts
heroku buildpacks:add -i 2 https://github.com/gnuletik/puppeteer-heroku-buildpack-fonts

# other buildpack
heroku buildpacks:add -i 3 heroku/nodejs

Credits

Thanks to @jonknapp for its initial fork (see CoffeeAndCode/puppeteer-heroku-buildpack#3)

puppeteer-heroku-buildpack-fonts's People

Contributors

gnuletik avatar

Stargazers

Gustavo Zanoni Braz avatar crush avatar hems.io avatar

Watchers

 avatar

puppeteer-heroku-buildpack-fonts's Issues

mv: cannot stat '/app/.cache/puppeteer': No such file or directory

Hello, thanks a lot for making this buildpack.

I'm currently trying it out and finding this error when bilding:

remote: -----> Build
remote:        Detected both "build" and "heroku-postbuild" scripts
remote:        Running heroku-postbuild (yarn)
remote:        yarn run v1.22.21
remote:        $ mkdir ./.cache && mv /app/.cache/puppeteer ./.cache
remote: mv: cannot stat '/app/.cache/puppeteer': No such file or directory
remote: error Command failed with exit code 1.
remote:        info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
remote: 
remote: -----> Build failed

that's how my package.json looks like:

{
  "name": "xxx",
  "version": "1.0.0",
  "description": "",
  "main": "src/index.ts",
  "scripts": {
    "start": "ts-node src/index.ts",
    "build": "tsc",
    "dev": "nodemon src/index.ts",
    "heroku-postbuild": "mkdir ./.cache && mv /app/.cache/puppeteer ./.cache"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@types/node": "^20.10.1",
    "cors": "^2.8.5",
    "dotenv": "^16.3.1",
    "express": "^4.18.2",
    "nodemon": "^3.0.1",
    "ts-node": "^10.9.1",
    "typescript": "^5.3.2"
  },
  "devDependencies": {
    "@types/cors": "^2.8.17",
    "@types/express": "^4.17.21"
  }
}

and this is how i setup my buildpacks:

	heroku buildpacks:add jontewks/puppeteer
	heroku buildpacks:add heroku/nodejs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.