【问题标题】:Heroku - '@heroku/buildpack-registry not accessible from @heroku-cli/plugin-buildpacks'Heroku - '@heroku/buildpack-registry 无法从 @heroku-cli/plugin-buildpacks 访问'
【发布时间】:2021-02-14 03:18:15
【问题描述】:

由于 Netlify 不再满足我的需求(我需要后端功能),我正在尝试通过 Heroku 启动我的 Nuxt SSR/Universal 应用程序。按照教程here,然后尝试通过使用third-party buildpacks来处理后续错误,结果出现以下错误:

npm ERR! @heroku/buildpack-registry not accessible from @heroku-cli/plugin-buildpacks

上下文的完整输出:

-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       NODE_VERBOSE=false
       
-----> Installing binaries
       engines.node (package.json):  14.x
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 14.x...
       Downloading and installing node 14.15.0...
       Using default npm version: 6.14.8
       
-----> Installing dependencies
       Installing node modules
       npm ERR! @heroku/buildpack-registry not accessible from @heroku-cli/plugin-buildpacks
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.dVBXd/_logs/2020-11-01T03_35_25_039Z-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

据我所知,我的本地 @heroku 副本上没有 buildpack-registry 文件夹,所以我不知道该文件夹应该有什么。我有用于 npm 的 Heroku CLI,运行 heroku buildpacks 得到我:

1. heroku/nodejs
2. https://github.com/stomita/heroku-buildback-phantomjs.git

应该都是有效的。我尝试在干净的环境中进行部署,结果相同。

对不起,如果这个问题有点漫无边际,我只是不知道从哪里开始尝试解决这个问题。

【问题讨论】:

    标签: node.js heroku nuxt.js


    【解决方案1】:

    结果我忘了安装@heroku-cli 需要的一些软件包。运行以下安装命令为我修复了它,但您可能缺少我拥有的软件包,或者我可能缺少您拥有的软件包。

    npm i @heroku/buildpack-registry async-file cli-ux got phoenix
    

    我最初很困惑,因为没有 @heroku 模块,但它只能作为 @heroku/buildpack-registry 访问

    【讨论】:

      猜你喜欢
      • 2021-11-29
      • 1970-01-01
      • 2016-10-10
      • 2021-11-26
      • 1970-01-01
      • 2015-09-11
      • 2020-11-07
      • 1970-01-01
      • 2017-01-10
      相关资源
      最近更新 更多