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
Related
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
I have deployed my app from git to Heroku successfully and I enabled automatic deployment that worked fine.
Somewhere in the past 2 weeks the deployment has started failing each time for the same reason, even though there's no problem with the code in the git - it's running fine.
You can see in the log file that it mentions each time:
" Creating an optimized production build...
Failed to compile.
./src/App.js
Cannot find file './pages/MainPage' in './src'.
But the MainPage file is right where it should be and the app is compiling and running locally.
I've tried disconnecting and reconnecting from git and heroku,
I've deleted and re-installed the node modules and the package-lock,
and I cache clean --force.
I don't know what went wrong, any suggestions?
Thank you!
-----> React.js (create-react-app) multi app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
=====> Detected Framework: Multipack
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 12.x...
Downloading and installing node 12.20.0...
Using default npm version: 6.14.8
-----> Restoring cache
Cached directories were not restored due to a change in version of node, npm, yarn or stack
Module installation may take longer for this build
-----> Installing dependencies
Installing node modules
> core-js#2.6.12 postinstall /tmp/build_826a0ec4_/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> fsevents#1.2.13 install /tmp/build_826a0ec4_/node_modules/webpack-dev-server/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> fsevents#1.2.13 install /tmp/build_826a0ec4_/node_modules/watchpack-chokidar2/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> core-js#3.8.0 postinstall /tmp/build_826a0ec4_/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> fsevents#1.2.13 install /tmp/build_826a0ec4_/node_modules/jest-haste-map/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> core-js-pure#3.8.0 postinstall /tmp/build_826a0ec4_/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
added 1695 packages in 29.379s
-----> Build
Running build
> rosenflix#0.1.0 build /tmp/build_826a0ec4_
> react-scripts build
Creating an optimized production build...
Failed to compile.
./src/App.js
Cannot find file './pages/MainPage' in './src'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rosenflix#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rosenflix#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.Zqszt/_logs/2020-12-02T21_16_51_485Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile React.js (create-react-app) multi app.
! Push failed
Your production build may be referencing a relative import that for some reason does not exist. Reconfigure that import using ${__dirname}/path_to_file and try again.
Here is a link of how to use it.
Hope this works for you.
I'm trying to push my git to Heroku but it gives an error right at the end. I had a look on console of deploying a project as I understand warnings are not a big deal for crashing the whole app. As I went through console I notice that critical error is
quasar: not found
error Command failed with exit code 127.
As far as I think is something wrong with npm or yarn package but don't really know what exactly. I specified in json file same version of node what I have and same version of npm what I have on my computer. I don't use yarn, could that be an issue ?
Here is my json
{
"name": "portfolio",
"version": "0.0.1",
"description": "A Quasar Framework app",
"productName": "Eldar Tailov",
"author": "'Eldar' <'tailov47#gmail.com'>",
"private": true,
"scripts": {
"build": "quasar build",
"start": "node server.js",
"heroku-postbuild": "yarn && yarn build"
},
"dependencies": {
"#quasar/extras": "^1.0.0",
"axios": "^0.20.0",
"connect-history-api-fallback": "^1.6.0",
"core-js": "^3.6.5",
"express": "^4.17.1",
"quasar": "^1.0.0",
"serve-static": "^1.14.1",
"vue2-google-maps": "^0.10.7"
},
"devDependencies": {
"#quasar/app": "^2.0.0",
"babel-eslint": "^10.0.1",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.9.0",
"eslint-loader": "^3.0.3",
"eslint-plugin-vue": "^6.1.2",
"workbox-webpack-plugin": "^5.1.4"
},
"browserslist": [
"last 10 Chrome versions",
"last 10 Firefox versions",
"last 4 Edge versions",
"last 7 Safari versions",
"last 8 Android versions",
"last 8 ChromeAndroid versions",
"last 8 FirefoxAndroid versions",
"last 10 iOS versions",
"last 5 Opera versions"
],
"engines": {
"node": "~12.18.2",
"npm": "~6.14.5",
"yarn": ">= 1.21.1"
}
}
and here is a log of heroku
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): ~12.18.2
engines.npm (package.json): ~6.14.5
engines.yarn (package.json): >= 1.21.1
Resolving node version ~12.18.2...
Downloading and installing node 12.18.4...
Bootstrapping npm ~6.14.5 (replacing 6.14.6)...
npm ~6.14.5 installed
Resolving yarn version >= 1.21.1...
Downloading and installing yarn (1.22.5)
Installed yarn 1.22.5
-----> Installing dependencies
Installing node modules
> core-js#3.6.5 postinstall /tmp/build_bc8b4d0e_/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> fsevents#1.2.13 install /tmp/build_bc8b4d0e_/node_modules/webpack-dev-server/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> ejs#2.7.4 postinstall /tmp/build_bc8b4d0e_/node_modules/ejs
> node ./postinstall.js
> fsevents#1.2.13 install /tmp/build_bc8b4d0e_/node_modules/watchpack-chokidar2/node_modules/fsevents
> node install.js
Skipping 'fsevents' build as platform linux is not supported
> node-sass#4.14.1 install /tmp/build_bc8b4d0e_/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-72_binding.node
Download complete
Binary saved to /tmp/build_bc8b4d0e_/node_modules/node-sass/vendor/linux-x64-72/binding.node
Caching binary to /tmp/npmcache.XZGoT/_cacache/node-sass/4.14.1/linux-x64-72_binding.node
> node-sass#4.14.1 postinstall /tmp/build_bc8b4d0e_/node_modules/node-sass
> node scripts/build.js
Binary found at /tmp/build_bc8b4d0e_/node_modules/node-sass/vendor/linux-x64-72/binding.node
Testing binary
Binary is fine
> core-js#2.6.11 postinstall /tmp/build_bc8b4d0e_/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
added 1590 packages in 23.801s
-----> Build
Detected both "build" and "heroku-postbuild" scripts
Running heroku-postbuild
> portfolio#0.0.1 heroku-postbuild /tmp/build_bc8b4d0e_
> yarn && yarn build
yarn install v1.22.5
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning vue2-google-maps > babel-runtime > core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
warning #quasar/app > webpack-dev-server > chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning #quasar/app > webpack-dev-server > chokidar > fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning #quasar/app > node-sass > request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning #quasar/app > node-sass > node-gyp > request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning #quasar/app > node-sass > request > har-validator#5.1.5: this library is no longer supported
warning #quasar/app > webpack > watchpack > watchpack-chokidar2 > chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning #quasar/app > stylus > css-parse > css > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
warning #quasar/app > webpack-dev-server > chokidar > braces > snapdragon > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
warning #quasar/app > webpack-dev-server > chokidar > braces > snapdragon > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
warning eslint-loader#3.0.4: This loader has been deprecated. Please use eslint-webpack-plugin
warning workbox-webpack-plugin > workbox-build > rollup-plugin-babel#4.4.0: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-babel.
warning workbox-webpack-plugin > workbox-build > #hapi/joi#15.1.1: joi is leaving the #hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning workbox-webpack-plugin > workbox-build > #hapi/joi > #hapi/address#2.1.4: This version has been deprecated and is no longer supported or maintained
warning workbox-webpack-plugin > workbox-build > #hapi/joi > #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
warning workbox-webpack-plugin > workbox-build > #hapi/joi > #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
warning workbox-webpack-plugin > workbox-build > #hapi/joi > #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
warning workbox-webpack-plugin > workbox-build > #hapi/joi > #hapi/topo > #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
[3/5] Fetching packages...
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > eslint-loader#3.0.4" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
warning " > workbox-webpack-plugin#5.1.4" has unmet peer dependency "webpack#^4.0.0".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 45.19s.
yarn run v1.22.5
$ quasar build
/bin/sh: 1: quasar: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! portfolio#0.0.1 heroku-postbuild: `yarn && yarn build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the portfolio#0.0.1 heroku-postbuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.XZGoT/_logs/2020-09-28T01_01_55_709Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
If you're stuck, please submit a ticket so we can help:
https://help.heroku.com/
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
I faced exactly the same issue as you did. I was able to fix it from the suggestions in this link. I think it's because the #quasar/app was listed in the dev dependencies.
https://devcenter.heroku.com/articles/nodejs-support#heroku-specific-build-steps
Basically, I updated the engine part of package.json to match my local env
"engines": {
"node": ">= 12.18.3",
"npm": ">= 6.14.11",
"yarn": ">= 1.22.5"
}
and then set the YARN_PRODUCTION env variable on heroku to false
heroku config:set YARN_PRODUCTION=false
I hope you'll find this useful (P.S. Of course don't set a static value in the engine part, use wildcard instead)
Quasar is probably not installed globally on heroku,
try to run it using npx:
"scripts": {
...
"build": "npx quasar build -m ssr",
"start": "cd dist/ssr; npm i; npm start"
}
System:
OS: macOS Mojave 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU # 2.30GHz
Memory: 50.37 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
npmPackages:
babel-plugin-styled-components: ^1.10.6 => 1.10.6
styled-components: ^5.0.0-rc.1 => 5.0.0-rc.1
Why I am getting this warning, even though I can see packages in node_modules
yarn add eslint-config-airbnb
yarn add v1.19.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "eslint-config-airbnb > eslint-config-airbnb-base#14.0.0" has unmet peer dependency "eslint-plugin-import#^2.18.2".
warning " > eslint-config-airbnb#18.0.1" has unmet peer dependency "eslint-plugin-import#^2.18.2".
warning " > eslint-config-airbnb#18.0.1" has unmet peer dependency "eslint-plugin-jsx-a11y#^6.2.3".
warning " > eslint-config-airbnb#18.0.1" has incorrect peer dependency "eslint-plugin-react-hooks#^1.7.0".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 3 new dependencies.
info Direct dependencies
└─ eslint-config-airbnb#18.0.1
info All dependencies
├─ confusing-browser-globals#1.0.9
├─ eslint-config-airbnb-base#14.0.0
└─ eslint-config-airbnb#18.0.1
✨ Done in 3.24s.
yarn add styled-components#beta
yarn add v1.19.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "styled-components > stylis-rule-sheet#0.0.10" has unmet peer dependency "stylis#^3.5.0".
warning " > styled-components#5.0.0-rc.1" has unmet peer dependency "react-is#>= 16.8.0".
[4/4] 🔨 Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ styled-components#5.0.0-rc.1
info All dependencies
└─ styled-components#5.0.0-rc.1
✨ Done in 3.19s.
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