在heroku上部署我的闪亮应用程序时出错

guicsvcw  于 2023-01-26  发布在  其他
关注(0)|答案(1)|浏览(188)

运行buildpack R(shiny)时出现超时错误将shiny应用程序部署到heroku时推送失败。项目结构良好。日志中没有错误。我正在使用heroku cli部署应用程序。
这是git仓库:https://github.com/akshaybholee/CountryProfileHeroku
这是我的git遥控器

git remote -v
heroku  https://git.heroku.com/countryprofile.git (fetch)
heroku  https://git.heroku.com/countryprofile.git (push)
origin  https://github.com/akshaybholee/CountryProfileHeroku.git (fetch)
origin  https://github.com/akshaybholee/CountryProfileHeroku.git (push)

我运行以下命令部署应用程序:

git push heroku main

下面是日志(这不是完整的日志,因为它太大,无法在这里发布):

Enumerating objects: 73, done.
Counting objects: 100% (73/73), done.
Delta compression using up to 8 threads
Compressing objects: 100% (68/68), done.
Writing objects: 100% (73/73), 307.61 KiB | 4.39 MiB/s, done.
Total 73 (delta 21), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-22 stack
remote: -----> Using buildpack: https://github.com/virtualstaticvoid/heroku-buildpack-r.git
remote: -----> R (shiny) app detected
remote: -----> Installing R
remote:        Version 4.2.1 will be installed on heroku-22 stack.
remote: -----> Downloading buildpack archives from AWS S3
remote:        Downloading https://heroku-buildpack-r.s3.amazonaws.com/latest/heroku-buildpack-r-22-4.2.1-deploy.tar.gz
remote:        Downloading https://heroku-buildpack-r.s3.amazonaws.com/latest/heroku-buildpack-r-22-4.2.1-shiny.tar.gz
remote:        Setting up build environment
remote:        Downloading https://heroku-buildpack-r.s3.amazonaws.com/latest/heroku-buildpack-r-22-4.2.1-chroot.tar.gz
remote: -----> Configuring build environment...
remote:
remote:  #     WARNING: Use of the Aptfile file is NOT recommended and will be deprecated in future.
remote:
remote:        For greater control and flexibility consider using the Heroku
remote:        container stack together with the heroku-docker-r implementation.
remote:        See https://github.com/virtualstaticvoid/heroku-docker-r for more information.
remote:
remote:        W: No sandbox user '_apt' on the system, can not drop privileges
remote:        Reading package lists...
remote:        Building dependency tree...
remote:        Reading state information...
remote:        The following additional packages will be installed:
remote:          default-libmysqlclient-dev gdal-data hdf5-helpers libaec-dev libaec0
remote:          libarmadillo-dev libarmadillo10 libarpack2 libarpack2-dev libblosc-dev
remote:          libblosc1 libboost-dev libboost1.74-dev libcfitsio-dev libcfitsio-doc
remote:          libcfitsio9 libcharls-dev libcharls2 libfreexl-dev libfreexl1 libfyba-dev
remote:          libfyba0 libgdal30 libgeos-c1v5 libgeos-dev libgeos3.10.2 libgeotiff-dev
remote:          libgeotiff5 libgif-dev libgif7 libhdf4-0-alt libhdf4-alt-dev libhdf5-103-1
remote:          libhdf5-cpp-103-1 libhdf5-dev libhdf5-fortran-102 libhdf5-hl-100
remote:          libhdf5-hl-cpp-100 libhdf5-hl-fortran-100 libjson-c-dev libkml-dev
remote:          libkmlbase1 libkmlconvenience1 libkmldom1 libkmlengine1 libkmlregionator1
remote:          libkmlxsd1 libminizip-dev libminizip1 libnetcdf-dev libnetcdf19 libnspr4
remote:          libnss3 libodbc2 libodbccr2 libodbcinst2 libogdi-dev libogdi4.1
remote:          libpoppler-dev libpoppler-private-dev libpoppler118 libproj-dev libproj22
remote:          libqhull-dev libqhull-r8.0 libqhull8.0 libqhullcpp8.0 librttopo-dev
remote:          librttopo1 libsnappy1v5 libspatialite-dev libspatialite7 libsqlite3-0
remote:          libsqlite3-dev libsuperlu-dev libsuperlu5 libsz2 liburiparser-dev
remote:          liburiparser1 libwebp-dev libxerces-c-dev libxerces-c3.2 proj-bin proj-data
remote:          unixodbc-common unixodbc-dev

remote:        installing to /app/R/site-library/00LOCK-spam/00new/spam/libs
remote:        ** R
remote:        ** data
remote:        *** moving datasets to lazyload DB
remote:        ** demo
remote:        ** inst
remote:        ** byte-compile and prepare package for lazy loading
remote: -----> Timed out running buildpack R (shiny)
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to countryprofile.
remote:
To https://git.heroku.com/countryprofile.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/countryprofile.git'

请帮我解决这个问题。

yrwegjxp

yrwegjxp1#

如果其他人遇到这种情况,并且不想构建Docker容器,那么按照下面的说明操作对我很有效:
Everytime I deploy to heroku I get a Timeout error
例如,“再次安装所有依赖项。我建议只对一半的依赖项推送一次,然后再对所有依赖项推送一次。这样就不会超时了。”
一旦安装好,它们就会被缓存,所以你不应该再遇到这种情况。

相关问题