Heroku deployment -Unable to locate package Aptfile - heroku

I built an app which uses geopackages/GDAL deployed via Heroku. So I added the buildpack-apt as described here. I included an Aptfile in the directory of my project with content
gdal-bin
I get the following error message during build:
-----> Building on the Heroku-18 stack
-----> Geo Packages (GDAL/GEOS/PROJ) app detected
-----> Installing GDAL-2.4.0
-----> Installing GEOS-3.7.2
-----> Installing PROJ-5.2.0
-----> Apt app detected
-----> Reusing cache
-----> Updating apt caches
Get:1 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease [104 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 Packages [369 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,379 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1,889 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,309 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2,146 kB]
Fetched 8,373 kB in 2s (5,003 kB/s)
Reading package lists...
-----> Fetching .debs for Aptfile
Reading package lists...
Building dependency tree...
E: Unable to locate package Aptfile
! Push rejected, failed to compile Apt app.
! Push failed
I was able to deploy numerous times before, the last time 6 days ago. If I revert to my previous commit for which the deployment worked, and try to deploy again, it fails with the error shown above.
In my previous successful deployments, I did get an error message but the build was able to continue, as shown below:
-----> Building on the Heroku-18 stack
-----> Geo Packages (GDAL/GEOS/PROJ) app detected
-----> Installing GDAL-2.4.0
-----> Installing GEOS-3.7.2
-----> Installing PROJ-5.2.0
-----> Apt app detected
-----> Reusing cache
-----> Updating apt caches
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Reading package lists...
-----> Fetching .debs for Aptfile
Reading package lists...
Building dependency tree...
E: Unable to locate package Aptfile
-----> Fetching .debs for gdal-bin
Reading package lists...
Building dependency tree...
The following additional packages will be installed:
gdal-data libaec0 libarmadillo8 libarpack2 libblas3 libdap25 libdapclient6v5
libepsilon1 libfreexl1 libfyba0 libgdal20 libgeos-3.7.1 libgeos-c1v5
libgeotiff2 libgfortran4 libgif7 libhdf4-0-alt libhdf5-100 libkmlbase1
libkmldom1 libkmlengine1 liblapack3 libminizip1 libnetcdf13 libnspr4 libnss3
libodbc1 libogdi3.2 libopenjp2-7 libpoppler73 libproj12 libqhull7
libspatialite7 libsuperlu5 libsz2 liburiparser1 libxerces-c3.2 odbcinst
odbcinst1debian2 proj-bin proj-data
Suggested packages:
libgdal-grass python-gdal geotiff-bin libgeotiff-epsg libhdf4-doc
libhdf4-alt-dev hdf4-tools libmyodbc odbc-postgresql tdsodbc unixodbc-bin
ogdi-bin
The following NEW packages will be installed:
gdal-bin gdal-data libaec0 libarmadillo8 libarpack2 libblas3 libdap25
libdapclient6v5 libepsilon1 libfreexl1 libfyba0 libgdal20 libgeos-3.7.1
libgeos-c1v5 libgeotiff2 libgfortran4 libgif7 libhdf4-0-alt libhdf5-100
libkmlbase1 libkmldom1 libkmlengine1 liblapack3 libminizip1 libnetcdf13
libnspr4 libnss3 libodbc1 libogdi3.2 libopenjp2-7 libpoppler73 libproj12
libqhull7 libspatialite7 libsuperlu5 libsz2 liburiparser1 libxerces-c3.2
odbcinst odbcinst1debian2 proj-bin proj-data
0 upgraded, 42 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/21.4 MB of archives.
After this operation, 79.9 MB of additional disk space will be used.
Download complete and in download only mode
-----> Installing gdal-bin_2.2.3+dfsg-2_amd64.deb
-----> Installing gdal-data_2.2.3+dfsg-2_all.deb
-----> Installing libaec0_0.3.2-2_amd64.deb
-----> Installing libarmadillo8_1%3a8.400.0+dfsg-2_amd64.deb
-----> Installing libarpack2_3.5.0+real-2_amd64.deb
-----> Installing libblas3_3.7.1-4ubuntu1_amd64.deb
-----> Installing libdap25_3.19.1-2build1_amd64.deb
-----> Installing libdapclient6v5_3.19.1-2build1_amd64.deb
-----> Installing libepsilon1_0.9.2+dfsg-2_amd64.deb
-----> Installing libfreexl1_1.0.5-1_amd64.deb
-----> Installing libfyba0_4.1.1-3_amd64.deb
-----> Installing libgdal20_2.2.3+dfsg-2_amd64.deb
-----> Installing libgeos-3.7.1_3.7.1-1~pgdg18.04+1_amd64.deb
-----> Installing libgeos-c1v5_3.7.1-1~pgdg18.04+1_amd64.deb
-----> Installing libgeotiff2_1.4.2-2build1_amd64.deb
-----> Installing libgfortran4_7.5.0-3ubuntu1~18.04_amd64.deb
-----> Installing libgif7_5.1.4-2ubuntu0.1_amd64.deb
-----> Installing libhdf4-0-alt_4.2.13-2_amd64.deb
-----> Installing libhdf5-100_1.10.0-patch1+docs-4_amd64.deb
-----> Installing libkmlbase1_1.3.0-5_amd64.deb
-----> Installing libkmldom1_1.3.0-5_amd64.deb
-----> Installing libkmlengine1_1.3.0-5_amd64.deb
-----> Installing liblapack3_3.7.1-4ubuntu1_amd64.deb
-----> Installing libminizip1_1.1-8build1_amd64.deb
-----> Installing libnetcdf13_1%3a4.6.0-2build1_amd64.deb
-----> Installing libnspr4_2%3a4.18-1ubuntu1_amd64.deb
-----> Installing libnss3_2%3a3.35-2ubuntu2.12_amd64.deb
-----> Installing libodbc1_2.3.4-1.1ubuntu3_amd64.deb
-----> Installing libogdi3.2_3.2.0+ds-2_amd64.deb
-----> Installing libopenjp2-7_2.3.0-2build0.18.04.1_amd64.deb
-----> Installing libpoppler73_0.62.0-2ubuntu2.12_amd64.deb
-----> Installing libproj12_4.9.3-2_amd64.deb
-----> Installing libqhull7_2015.2-4_amd64.deb
-----> Installing libspatialite7_4.3.0a-5build1_amd64.deb
-----> Installing libsuperlu5_5.2.1+dfsg1-3_amd64.deb
-----> Installing libsz2_0.3.2-2_amd64.deb
-----> Installing liburiparser1_0.8.4-1_amd64.deb
-----> Installing libxerces-c3.2_3.2.0+debian-2_amd64.deb
-----> Installing odbcinst1debian2_2.3.4-1.1ubuntu3_amd64.deb
-----> Installing odbcinst_2.3.4-1.1ubuntu3_amd64.deb
-----> Installing proj-bin_4.9.3-2_amd64.deb
-----> Installing proj-data_4.9.3-2_all.deb
-----> Writing profile script
-----> Rewrite package-config files
-----> Python app detected
-----> No change in requirements detected, installing from cache
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
-----> Geo Packages (GDAL/GEOS/PROJ) app detected
-----> Installing GDAL-2.4.0
-----> Installing GEOS-3.7.2
-----> Installing PROJ-5.2.0
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 110.3M
-----> Launching...
I checked that the aptfile is on my github repo through which I push to deploy to heroku.
I'm not finding similar errors on stackoverflow or others, any idea how to fix this?

Actually I was able to find a solution.
I did "heroku run bash" on my app via the heroku cli and looked at the folder tree.
"Aptfile" was in the root app directory.
I moved it to the .apt/ directory.
The next build I attempted was successful, and the "E: Unable to locate package Aptfile" is gone.

I followes the same link. I am getting the following error:
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal3.1.0", "gdal3.0.0", "gdal2.4.0", "gdal2.3.0", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
I followed these steps:
Added https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku-community/apt.tgz into my buildpacks
Created an Aptfile into my root directory and added gdal-bin into it.
Deployed the app

Related

heroku laravel - vite not found

Any help/guidance thank you in advance.
Today I've set up a Heroku dyno, but can't get the vite command to run.
Laravel 9.29, NodeJS 8.15
Trying to run heroku run npm run dev but returns /tmp/dev-3799b748.sh: 1: vite: not found
I've set the build packs to:
heroku buildpacks
=== manage-demo Buildpack URLs
heroku/nodejs
heroku/php
Also the Config Vars NPM_CONFIG_PRODUCTION = false, YARN_PRODUCTION = false
Commands used to create the Laravel Project:
composer create-project laravel/laravel <myprojectname>
composer require laravel/breeze
php artisan breeze:install react
php artisan migrate
npm install
Deploy Branch
-----> Building on the Heroku-22 stack
-----> Using buildpacks:
1. heroku/nodejs
2. heroku/php
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_PRODUCTION=false
NPM_CONFIG_LOGLEVEL=error
USE_NPM_INSTALL=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 16.x...
Downloading and installing node 16.17.0...
Using default npm version: 8.15.0
-----> Restoring cache
- node_modules (not cached - skipping)
-----> Installing dependencies
Installing node modules (package.json + package-lock)
added 165 packages, and audited 166 packages in 3s
25 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build
Running build
> build
> vite build
vite v3.1.0 building for production...
transforming...
✓ 254 modules transformed.
rendering chunks...
public/build/manifest.json 3.78 KiB
public/build/assets/ConfirmPassword.6778c5aa.js 1.09 KiB / gzip: 0.61 KiB
public/build/assets/InputLabel.b7560c9a.js 0.20 KiB / gzip: 0.18 KiB
public/build/assets/TextInput.90051331.js 0.63 KiB / gzip: 0.39 KiB
public/build/assets/PrimaryButton.63fa2720.js 0.82 KiB / gzip: 0.49 KiB
public/build/assets/ApplicationLogo.4d214c56.js 3.06 KiB / gzip: 1.30 KiB
public/build/assets/ForgotPassword.863d1afc.js 1.06 KiB / gzip: 0.62 KiB
public/build/assets/Login.ffce380f.js 1.94 KiB / gzip: 0.89 KiB
public/build/assets/Register.13d4ee0d.js 1.95 KiB / gzip: 0.76 KiB
public/build/assets/ResetPassword.467e122e.js 1.57 KiB / gzip: 0.65 KiB
public/build/assets/VerifyEmail.800ac39d.js 1.07 KiB / gzip: 0.61 KiB
public/build/assets/Dashboard.c9f20060.js 17.64 KiB / gzip: 6.24 KiB
public/build/assets/Welcome.875c53e4.js 11.94 KiB / gzip: 3.72 KiB
public/build/assets/app.5c62c80a.css 22.06 KiB / gzip: 4.63 KiB
public/build/assets/app.36a55110.js 315.09 KiB / gzip: 107.01 KiB
-----> Caching build
- node_modules
-----> Pruning devDependencies
Skipping because NPM_CONFIG_PRODUCTION is 'false'
-----> Build succeeded!
-----> PHP app detected
-----> Bootstrapping...
-----> Preparing platform package installation...
-----> Installing platform packages...
- php (8.1.10)
- apache (2.4.54)
- composer (2.4.1)
- nginx (1.22.0)
NOTICE: detected userland polyfill packages for PHP extensions
NOTICE: now attempting to install native extension packages
Installing extensions provided by symfony/polyfill-mbstring:
- ext-mbstring...
Installing extensions provided by symfony/polyfill-ctype:
- ext-ctype...
-----> Installing dependencies...
Composer version 2.4.1 2022-08-20 11:44:50
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 70 installs, 0 updates, 0 removals
- Installing doctrine/inflector (2.0.5): Extracting archive
- Installing doctrine/lexer (1.2.3): Extracting archive
- Installing symfony/polyfill-ctype (v1.26.0): Extracting archive
- Installing webmozart/assert (1.11.0): Extracting archive
- Installing dragonmantank/cron-expression (v3.3.2): Extracting archive
- Installing symfony/polyfill-mbstring (v1.26.0): Extracting archive
- Installing symfony/deprecation-contracts (v3.1.1): Extracting archive
- Installing symfony/http-foundation (v6.1.4): Extracting archive
- Installing fruitcake/php-cors (v1.2.0): Extracting archive
- Installing psr/http-message (1.0.1): Extracting archive
- Installing psr/http-client (1.0.1): Extracting archive
- Installing ralouphie/getallheaders (3.0.3): Extracting archive
- Installing psr/http-factory (1.0.1): Extracting archive
- Installing guzzlehttp/psr7 (2.4.1): Extracting archive
- Installing guzzlehttp/promises (1.5.2): Extracting archive
- Installing guzzlehttp/guzzle (7.5.0): Extracting archive
- Installing voku/portable-ascii (2.0.1): Extracting archive
- Installing symfony/polyfill-php80 (v1.26.0): Extracting archive
- Installing phpoption/phpoption (1.9.0): Extracting archive
- Installing graham-campbell/result-type (v1.1.0): Extracting archive
- Installing vlucas/phpdotenv (v5.4.1): Extracting archive
- Installing symfony/css-selector (v6.1.3): Extracting archive
- Installing tijsverkoyen/css-to-inline-styles (2.2.4): Extracting archive
- Installing symfony/var-dumper (v6.1.3): Extracting archive
- Installing symfony/routing (v6.1.3): Extracting archive
- Installing symfony/process (v6.1.3): Extracting archive
- Installing symfony/polyfill-php72 (v1.26.0): Extracting archive
- Installing symfony/polyfill-intl-normalizer (v1.26.0): Extracting archive
- Installing symfony/polyfill-intl-idn (v1.26.0): Extracting archive
- Installing symfony/mime (v6.1.4): Extracting archive
- Installing psr/container (2.0.2): Extracting archive
- Installing symfony/service-contracts (v3.1.1): Extracting archive
- Installing psr/event-dispatcher (1.0.0): Extracting archive
- Installing symfony/event-dispatcher-contracts (v3.1.1): Extracting archive
- Installing symfony/event-dispatcher (v6.1.0): Extracting archive
- Installing psr/log (3.0.0): Extracting archive
- Installing egulias/email-validator (3.2.1): Extracting archive
- Installing symfony/mailer (v6.1.4): Extracting archive
- Installing symfony/error-handler (v6.1.3): Extracting archive
- Installing symfony/http-kernel (v6.1.4): Extracting archive
- Installing symfony/finder (v6.1.3): Extracting archive
- Installing symfony/polyfill-intl-grapheme (v1.26.0): Extracting archive
- Installing symfony/string (v6.1.4): Extracting archive
- Installing symfony/console (v6.1.4): Extracting archive
- Installing symfony/polyfill-php81 (v1.26.0): Extracting archive
- Installing ramsey/collection (1.2.2): Extracting archive
- Installing brick/math (0.10.2): Extracting archive
- Installing ramsey/uuid (4.4.0): Extracting archive
- Installing psr/simple-cache (3.0.0): Extracting archive
- Installing nunomaduro/termwind (v1.14.0): Extracting archive
- Installing symfony/translation-contracts (v3.1.1): Extracting archive
- Installing symfony/translation (v6.1.4): Extracting archive
- Installing nesbot/carbon (2.62.1): Extracting archive
- Installing monolog/monolog (2.8.0): Extracting archive
- Installing league/mime-type-detection (1.11.0): Extracting archive
- Installing league/flysystem (3.3.0): Extracting archive
- Installing nette/utils (v3.2.7): Extracting archive
- Installing nette/schema (v1.2.2): Extracting archive
- Installing dflydev/dot-access-data (v3.0.1): Extracting archive
- Installing league/config (v1.1.1): Extracting archive
- Installing league/commonmark (2.3.5): Extracting archive
- Installing laravel/serializable-closure (v1.2.2): Extracting archive
- Installing laravel/framework (v9.29.0): Extracting archive
- Installing inertiajs/inertia-laravel (v0.6.3): Extracting archive
- Installing laravel/breeze (v1.13.0): Extracting archive
- Installing laravel/sanctum (v2.15.1): Extracting archive
- Installing nikic/php-parser (v4.15.1): Extracting archive
- Installing psy/psysh (v0.11.8): Extracting archive
- Installing laravel/tinker (v2.7.2): Extracting archive
- Installing tightenco/ziggy (v1.4.6): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover --ansi
INFO Discovering packages.
inertiajs/inertia-laravel ............................................. DONE
laravel/breeze ........................................................ DONE
laravel/sanctum ....................................................... DONE
laravel/tinker ........................................................ DONE
nesbot/carbon ......................................................... DONE
nunomaduro/termwind ................................................... DONE
tightenco/ziggy ....................................................... DONE
49 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
-----> Preparing runtime environment...
-----> Checking for additional extensions to install...
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 66M
-----> Launching...
Released v29
https://manage-demo.herokuapp.com/ deployed to Heroku
Starting November 28th, 2022, free Heroku Dynos, free Heroku Postgres, and free Heroku Data for Redis® will no longer be available.
If you have apps using any of these resources, you must upgrade to paid plans by this date to ensure your apps continue to run and to retain your data. For students, we will announce a new program by the end of September. Learn more at https://blog.heroku.com/next-chapter
heroku run npm run dev
npm WARN config production Use `--omit=dev` instead.
> dev
> vite
VITE v3.1.0 ready in 507 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
[..................] | : timing config:load:flatten Completed in 2ms
LARAVEL v9.29.0 plugin v0.6.0
➜ APP_URL: https://manage-demo.herokuapp.com/
node:internal/errors:477 timing config:load:flatten Completed in 2ms
ErrorCaptureStackTrace(err);
^
Error: ENOSPC: System limit for number of file watchers reached, watch '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2301:34)
at createFsWatchInstance (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49738:17)
at setFsWatchListener (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49785:15)
at NodeFsHandler$1._watchWithNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49940:14)
at NodeFsHandler$1._handleFile (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50004:23)
at NodeFsHandler$1._addToNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50246:21)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:51434:10)
at NodeFsHandler$1._addToNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50254:18) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h',
filename: '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h'
}

Heroku APT file is not used in the Pipeline

I'm using Apt file in Heroku to have graphicmagic package available in Dyno for years.
Now I wanted to set up Heroku Pipeline tests, but the Heroku does not install apt packages in the build for tests at all. So tests using the graphicmagic are failing.
Is there any way to install the apt packages in the build for Heroku Pipeline tests?
Build logs are here:
Application build log (installing Apt packages at the end)
-----> Building on the Heroku-20 stack
-----> Using buildpacks:
1. heroku/nodejs
2. https://github.com/heroku/heroku-buildpack-apt
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=test
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 10.23.*
engines.npm (package.json): 6.14.8
Resolving node version 10.23.*...
Downloading and installing node 10.23.3...
Bootstrapping npm 6.14.8 (replacing 6.14.11)...
npm 6.14.8 installed
-----> Restoring cache
- node_modules
-----> Installing dependencies
Installing node modules
> PayJsRouter#1.40.0 preinstall /tmp/build_6e87a3cd
> npx npm-force-resolutions
npx: installed 6 in 2.301s
> core-js#2.6.11 postinstall /tmp/build_6e87a3cd/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> protobufjs#6.10.1 postinstall /tmp/build_6e87a3cd/node_modules/protobufjs
> node scripts/postinstall
> fsevents#1.2.13 install /tmp/build_6e87a3cd/node_modules/babel/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> fsevents#1.2.13 install /tmp/build_6e87a3cd/node_modules/steal-tools/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> fsevents#1.2.13 install /tmp/build_6e87a3cd/node_modules/nodemon/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> nodemon#1.19.4 postinstall /tmp/build_6e87a3cd/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
> PayJsRouter#1.40.0 postinstall /tmp/build_6e87a3cd
> npm run build-steal && npm run build-lodash && npm run build-prepare
> PayJsRouter#1.40.0 build-steal /tmp/build_6e87a3cd
> node ./scripts/buildSteal
> PayJsRouter#1.40.0 build-lodash /tmp/build_6e87a3cd
> node ./node_modules/lodash-cli/bin/lodash compat exports=umd modularize --development --output node_modules/lodash/
Created 420 modules in 13.616 seconds.
> PayJsRouter#1.40.0 build-prepare /tmp/build_6e87a3cd
> mkdir -p ./public/dist/templates
added 1681 packages in 66.104s
-----> Build
Running build
> PayJsRouter#1.40.0 build /tmp/build_6e87a3cd
> grunt steal-build
... MANY LINES OF BUILD OUTPUT
Build was successful.
Done.
-----> Caching build
- node_modules
-----> Pruning devDependencies
Skipping because NODE_ENV is 'test'
-----> Cleanup
Running heroku-cleanup
> PayJsRouter#1.40.0 heroku-cleanup /tmp/build_6e87a3cd
> npm prune --production
added 458 packages from 863 contributors, removed 1041 packages and audited 643 packages in 28.358s
38 packages are looking for funding
run `npm fund` for details
found 44 vulnerabilities (13 low, 11 moderate, 19 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
-----> Build succeeded!
-----> Apt app detected
-----> Reusing cache
-----> Updating apt caches
Get:1 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [81.6 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Get:4 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [310 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [778 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [684 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,194 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [952 kB]
Fetched 4,222 kB in 1s (3,431 kB/s)
Reading package lists...
-----> Fetching .debs for graphicsmagick
Reading package lists...
Building dependency tree...
The following additional packages will be installed:
libgraphicsmagick-q16-3
Suggested packages:
graphicsmagick-dbg
The following NEW packages will be installed:
graphicsmagick libgraphicsmagick-q16-3
0 upgraded, 2 newly installed, 0 to remove and 20 not upgraded.
Need to get 0 B/1,794 kB of archives.
After this operation, 8,566 kB of additional disk space will be used.
Download complete and in download only mode
-----> Fetching .debs for libpng-dev
Reading package lists...
Building dependency tree...
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 20 not upgraded.
Need to get 0 B/175 kB of archives.
After this operation, 0 B of additional disk space will be used.
Download complete and in download only mode
-----> Fetching .debs for zlib1g-dev
Reading package lists...
Building dependency tree...
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 20 not upgraded.
Need to get 0 B/155 kB of archives.
After this operation, 0 B of additional disk space will be used.
Download complete and in download only mode
-----> Installing graphicsmagick_1.4+really1.3.35-1_amd64.deb
-----> Installing libgraphicsmagick-q16-3_1.4+really1.3.35-1_amd64.deb
-----> Installing libpng-dev_1.6.37-2_amd64.deb
-----> Installing zlib1g-dev_1%3a1.2.11.dfsg-2ubuntu1.2_amd64.deb
-----> Writing profile script
-----> Rewrite package-config files
-----> Discovering process types
Procfile declares types -> web, worker
-----> Compressing...
Done: 82.1M
-----> Launching...
Released v823
https://xyz.herokuapp.com/ deployed to Heroku
Pipeline test build log (installing Apt packages is not present)
-----> Building on the Heroku-20 stack
-----> Auto detecting buildpacks...
buildpack detected
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_PRODUCTION=false
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=testing
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 10.23.*
engines.npm (package.json): 6.14.8
Resolving node version 10.23.*...
Downloading and installing node 10.23.3...
Bootstrapping npm 6.14.8 (replacing 6.14.11)...
npm 6.14.8 installed
-----> Restoring cache
- node_modules
-----> Installing dependencies
Installing node modules
.
> PayJsRouter#1.40.0 preinstall /app
> npx npm-force-resolutions
npx: installed 6 in 2.844s
> core-js#2.6.11 postinstall /app/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> protobufjs#6.10.1 postinstall /app/node_modules/protobufjs
> node scripts/postinstall
> fsevents#1.2.13 install /app/node_modules/babel/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> fsevents#1.2.13 install /app/node_modules/steal-tools/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> fsevents#1.2.13 install /app/node_modules/nodemon/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> nodemon#1.19.4 postinstall /app/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
> PayJsRouter#1.40.0 postinstall /app
> npm run build-steal && npm run build-lodash && npm run build-prepare
> PayJsRouter#1.40.0 build-steal /app
> node ./scripts/buildSteal
> PayJsRouter#1.40.0 build-lodash /app
> node ./node_modules/lodash-cli/bin/lodash compat exports=umd modularize --development --output node_modules/lodash/
Created 420 modules in 17.29 seconds.
> PayJsRouter#1.40.0 build-prepare /app
> mkdir -p ./public/dist/templates
added 1738 packages in 85.344s
-----> Build
Running build
> PayJsRouter#1.40.0 build /app
> grunt steal-build
... MANY LINES OF BUILD OUTPUT
Build was successful.
Done.
-----> Caching build
- node_modules
-----> Pruning devDependencies
Skipping because NODE_ENV is not 'production'
-----> Build succeeded!
-----> No test-setup command provided. Skipping.
It is autodetecting. Your Apt buildpack is not recognized:
-----> Auto detecting buildpacks...
buildpack detected
-----> Node.js app detected
For your application setting the buildpack with heroku buildpacks:set is sufficient.
For the pipeline you need an app.json with your buildpacks:
{
"buildpacks": [
{
"url": "heroku/nodejs"
},
{
"url": "https://github.com/heroku/heroku-buildpack-apt"
}
]
}
Ressources to read:
https://devcenter.heroku.com/articles/heroku-ci and https://devcenter.heroku.com/articles/app-json-schema#buildpacks

Heroku does not install module psycopg2 even if it's on the requirements.txt file

I'm trying to deploy a python + flask + postgres app to heroku, but after deploying I get a
2020-09-11T15:11:45.278473+00:00 app[web.1]: dbapi = dialect_cls.dbapi(**dbapi_args)
2020-09-11T15:11:45.278474+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 753, in dbapi
2020-09-11T15:11:45.278474+00:00 app[web.1]: import psycopg2
2020-09-11T15:11:45.278475+00:00 app[web.1]: ModuleNotFoundError: No module named 'psycopg2'
And this is the build log
-----> Python app detected
-----> No change in requirements detected, installing from cache
-----> Installing pip 9.0.2, setuptools 47.1.1 and wheel 0.34.2
Skipping installation, as Pipfile.lock hasn't changed since last deploy.
-----> Installing SQLite3
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 84M
-----> Launching...
Released v35
I have no idea where the SQLite3 module is coming from.
This is the requirements.txt. I tried with the psycopg2==2.8.6 only, with psycopg2-binary==2.8.6 only, and with both, nothing seems to work.
Anyone have any suggestions?
alembic==1.4.2
astroid==2.4.2
click==7.1.2
colorama==0.4.3
dnspython==2.0.0
email-validator==1.1.1
flake8==3.8.3
Flask==1.1.2
Flask-Login==0.5.0
Flask-Migrate==2.5.3
Flask-SQLAlchemy==2.4.4
Flask-WTF==0.14.3
gunicorn==20.0.4
idna==2.10
isort==5.5.2
itsdangerous==1.1.0
Jinja2==2.11.2
lazy-object-proxy==1.4.3
Mako==1.1.3
MarkupSafe==1.1.1
mccabe==0.6.1
protobuf==3.13.0
psycopg2==2.8.6
psycopg2-binary==2.8.6
pycodestyle==2.6.0
pyflakes==2.2.0
pylint==2.6.0
pylint-flask==0.6
pylint-flask-sqlalchemy==0.2.0
pylint-plugin-utils==0.6
python-dateutil==2.8.1
python-dotenv==0.14.0
python-editor==1.0.4
six==1.15.0
SQLAlchemy==1.3.19
toml==0.10.1
Werkzeug==1.0.1
wrapt==1.12.1
WTForms==2.3.3

After deploying getting internal server error on heroku

Build successfully but still getting internal server error.
Please help to fix this, build message is given below:-
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 10.6.0
engines.npm (package.json): unspecified (use default)
Resolving node version 10.6.0...
Downloading and installing node 10.6.0...
Using default npm version: 6.1.0
-----> Restoring cache
Loading 2 from cacheDirectories (default):
- node_modules
- bower_components (not cached - skipping)
-----> Building dependencies
Installing node modules (package.json + package-lock)
audited 492 packages in 2.222s
found 0 vulnerabilities -----> Caching build
Clearing previous node cache
Saving 2 cacheDirectories (default):
- node_modules
- bower_components (nothing to cache)
-----> Pruning devDependencies
removed 66 packages and audited 355 packages in 2.11s
found 0 vulnerabilities
-----> Build succeeded!
-----> Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
-----> Compressing...
Done: 22.6M
-----> Launching...
Released v14
https://young-forest-74580.herokuapp.com/ deployed to Heroku

Installing Ruby-Gnome2 on Ubuntu with RVM

I have RVM running and it is working brilliantly, but I can't seem to figure out how to install ruby-gnome2. I have followed the steps on this tutorial, which are:
rvm use 1.9.1 # I use 1.9.1 which should work with ruby-gnome2
wget http://downloads.sourceforge.net/ruby-gnome2/ruby-gnome2-all-0.19.4.tar.gz
tar zxf ruby-gnome2-all-0.19.4.tar.gz
cd ruby-gnome2-all-0.19.4/
ruby extconf.rb —ruby=`which ruby`
make
make install
This produces no errors, so I assume it worked. So I try to test it with:
$ irb
irb(main):001:0> require 'gtk2'
Which gives me this error:
irb(main):001:0> require 'gtk2'
LoadError: no such file to load -- gtk2
Why am I not able to install ruby-gnome2?
Install system dependecies:
sudo apt-get install libglib2.0-dev libatk1.0-dev libcairo-dev
libsqlite3-dev libpango1.0-dev libgtk2.0-dev libgdk-pixbuf2.0
Install gtk2 gem which is ruby-gnome2:
gem install gtk2
You can run this tiny script to verify that gtk2 is installed:
require 'gtk2'
win = Gtk::Window.new("My ruby-gnome2 project")
win.show_all
Gtk.main
I hope that, when you followed those instructions, on the line:
ruby extconf.rb —ruby=`which ruby`
You actually:
used two dashes -- (the code in the page replaced those two dashes with a long one)
replaced the `which ruby` (note the backticks) with the actual output of running that command on your OS (with no backticks)
If not, that's your error.
If you actually did all those, please post the output you got from the ruby extconf.rb ... line.
In order to build ruby-gnome2 for RVM with all dependencies, ensure the following packages are installed before you build your ruby binary:
sudo apt-get install libatk1.0-dev libpanel-applet-4-dev libgtksourceview2.0-dev libvte-dev libgstreamer0.10-dev libbonobo2-dev libbonoboui2-dev libgtk2.0-dev libgdk-pixbuf2.0-dev libgtksourceview2.0-dev libpango1.0-dev libpoppler-dev libglade2-dev libart-2.0-dev libgnomeprint2.2-dev libgnomecanvas2-dev libgtkglext1-dev libgnomeprintui2.2-dev libgoocanvas-dev libgnomevfs2-dev libgconf2-dev librsvg2-dev
You can rebuild it again after installing these with:
rvm install 1.9.1
Then, follow the instructions you posted:
rvm use 1.9.1 # I use 1.9.1 which should work with ruby-gnome2
wget http://downloads.sourceforge.net/ruby-gnome2/ruby-gnome2-all-0.19.4.tar.gz
tar zxf ruby-gnome2-all-0.19.4.tar.gz
cd ruby-gnome2-all-0.19.4/
ruby extconf.rb —ruby=`which ruby`
# Alternatively you may use the following line
# to install into rvm's dir and avoid conflict with system libs
# ruby extconf.rb --ruby=`which ruby` --prefix=$MY_RUBY_HOME
make
make install
I need gtk2 in rvm on ubuntu 14.04.1 with ruby 2.1.2
(~)$ pdfwalker
Error: you need to install ruby-gtk2 to run this application
So get all the requirements
sudo apt-get install ruby-gtk2
Watch it install
(~)$ sudo apt-get install ruby-gtk2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gambas3-gb-form-stock kde-l10n-engb libp11-kit-gnome-keyring:i386
wine-gecko2.21 wine-gecko2.21:i386 wine-mono0.0.8
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libruby1.9.1 libruby2.0 ruby ruby-atk ruby-cairo ruby-gdk-pixbuf2 ruby-glib2
ruby-gobject-introspection ruby-pango ruby1.9.1 ruby2.0 rubygems-integration
Suggested packages:
ri ruby-dev ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev ruby-switch
bundler
The following NEW packages will be installed:
libruby1.9.1 libruby2.0 ruby ruby-atk ruby-cairo ruby-gdk-pixbuf2 ruby-glib2
ruby-gobject-introspection ruby-gtk2 ruby-pango ruby1.9.1 ruby2.0
rubygems-integration
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,579 kB of archives.
After this operation, 31.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main ruby all 1:1.9.3.4 [5,334 B]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main ruby1.9.1 amd64 1.9.3.484-2ubuntu1 [35.6 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty/main libruby1.9.1 amd64 1.9.3.484-2ubuntu1 [2,667 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty/main rubygems-integration all 1.5 [5,340 B]
Get:5 http://us.archive.ubuntu.com/ubuntu/ trusty/main ruby2.0 amd64 2.0.0.484-1ubuntu2 [66.5 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ trusty/main libruby2.0 amd64 2.0.0.484-1ubuntu2 [2,807 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ trusty/universe ruby-glib2 amd64 2.1.0-1 [133 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ trusty/universe ruby-atk amd64 2.1.0-1 [26.4 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu/ trusty/universe ruby-cairo amd64 1.12.8-1 [96.5 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu/ trusty/universe ruby-gdk-pixbuf2 amd64 2.1.0-1 [25.9 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu/ trusty/universe ruby-gobject-introspection amd64 2.1.0-1 [38.9 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu/ trusty/universe ruby-pango amd64 2.1.0-1 [53.0 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu/ trusty/universe ruby-gtk2 amd64 2.1.0-1 [619 kB]
Fetched 6,579 kB in 17s (367 kB/s)
Selecting previously unselected package ruby.
(Reading database ... 277672 files and directories currently installed.)
Preparing to unpack .../ruby_1%3a1.9.3.4_all.deb ...
Unpacking ruby (1:1.9.3.4) ...
Selecting previously unselected package ruby1.9.1.
Preparing to unpack .../ruby1.9.1_1.9.3.484-2ubuntu1_amd64.deb ...
Unpacking ruby1.9.1 (1.9.3.484-2ubuntu1) ...
Selecting previously unselected package libruby1.9.1.
Preparing to unpack .../libruby1.9.1_1.9.3.484-2ubuntu1_amd64.deb ...
Unpacking libruby1.9.1 (1.9.3.484-2ubuntu1) ...
Selecting previously unselected package rubygems-integration.
Preparing to unpack .../rubygems-integration_1.5_all.deb ...
Unpacking rubygems-integration (1.5) ...
Selecting previously unselected package ruby2.0.
Preparing to unpack .../ruby2.0_2.0.0.484-1ubuntu2_amd64.deb ...
Unpacking ruby2.0 (2.0.0.484-1ubuntu2) ...
Selecting previously unselected package libruby2.0:amd64.
Preparing to unpack .../libruby2.0_2.0.0.484-1ubuntu2_amd64.deb ...
Unpacking libruby2.0:amd64 (2.0.0.484-1ubuntu2) ...
Selecting previously unselected package ruby-glib2.
Preparing to unpack .../ruby-glib2_2.1.0-1_amd64.deb ...
Unpacking ruby-glib2 (2.1.0-1) ...
Selecting previously unselected package ruby-atk.
Preparing to unpack .../ruby-atk_2.1.0-1_amd64.deb ...
Unpacking ruby-atk (2.1.0-1) ...
Selecting previously unselected package ruby-cairo.
Preparing to unpack .../ruby-cairo_1.12.8-1_amd64.deb ...
Unpacking ruby-cairo (1.12.8-1) ...
Selecting previously unselected package ruby-gdk-pixbuf2.
Preparing to unpack .../ruby-gdk-pixbuf2_2.1.0-1_amd64.deb ...
Unpacking ruby-gdk-pixbuf2 (2.1.0-1) ...
Selecting previously unselected package ruby-gobject-introspection.
Preparing to unpack .../ruby-gobject-introspection_2.1.0-1_amd64.deb ...
Unpacking ruby-gobject-introspection (2.1.0-1) ...
Selecting previously unselected package ruby-pango.
Preparing to unpack .../ruby-pango_2.1.0-1_amd64.deb ...
Unpacking ruby-pango (2.1.0-1) ...
Selecting previously unselected package ruby-gtk2.
Preparing to unpack .../ruby-gtk2_2.1.0-1_amd64.deb ...
Unpacking ruby-gtk2 (2.1.0-1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up ruby (1:1.9.3.4) ...
Setting up libruby1.9.1 (1.9.3.484-2ubuntu1) ...
Setting up rubygems-integration (1.5) ...
Setting up ruby2.0 (2.0.0.484-1ubuntu2) ...
Setting up libruby2.0:amd64 (2.0.0.484-1ubuntu2) ...
Setting up ruby-glib2 (2.1.0-1) ...
Setting up ruby-atk (2.1.0-1) ...
Setting up ruby-cairo (1.12.8-1) ...
Setting up ruby-gdk-pixbuf2 (2.1.0-1) ...
Setting up ruby-gobject-introspection (2.1.0-1) ...
Setting up ruby-pango (2.1.0-1) ...
Setting up ruby-gtk2 (2.1.0-1) ...
Setting up ruby1.9.1 (1.9.3.484-2ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.3) ...
Pop into RVM
rvm use 2.1.2
gem install gtk2
Watch the install happen
(~)$ gem install gtk2
Fetching: pkg-config-1.1.5.gem (100%)
Successfully installed pkg-config-1.1.5
Fetching: glib2-2.2.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed glib2-2.2.0
Fetching: atk-2.2.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed atk-2.2.0
Fetching: cairo-1.12.9.gem (100%)
Building native extensions. This could take a while...
Successfully installed cairo-1.12.9
Fetching: pango-2.2.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed pango-2.2.0
Fetching: gdk_pixbuf2-2.2.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed gdk_pixbuf2-2.2.0
Fetching: gtk2-2.2.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed gtk2-2.2.0
7 gems installed
Fireup your app.
pdfwalker

Resources