我尝试通过 Heroku 启动我的 Nuxt SSR/Universal 应用程序,因为 Netlify 不再满足我的需求(我需要后端功能)。按照教程进行操作here https://nuxtjs.org/faq/heroku-deployment/,然后尝试通过使用来处理后续错误第三方构建包 https://elements.heroku.com/buildpacks/stomita/heroku-buildpack-phantomjs,我最终出现以下错误:
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
据我所知,没有buildpack-registry
我的 @heroku 本地副本上的文件夹,所以我不知道该文件夹应该有什么。我有适用于 npm 的 Heroku CLI,并且正在运行heroku buildpacks
让我明白:
1. heroku/nodejs
2. https://github.com/stomita/heroku-buildback-phantomjs.git
这应该都是有效的。我尝试在干净的环境中部署,得到了相同的结果。
抱歉,如果问题有点漫无目的,我只是不知道从哪里开始尝试解决这个问题。
原来我忘记安装一些软件包了@heroku-cli
需要。运行以下安装命令为我解决了这个问题,但您可能缺少我拥有的软件包,或者我可能缺少您拥有的软件包。
npm i @heroku/buildpack-registry async-file cli-ux got phoenix
我最初很困惑,因为没有 @heroku 模块,但它只能作为 @heroku/buildpack-registry 访问
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)