【问题标题】:Heroku Deployment Error: npm ERR! Host key verification failed. NextJS/ExpressJS AppHeroku 部署错误:npm ERR!主机密钥验证失败。 NextJS/ExpressJS 应用程序
【发布时间】:2021-10-23 07:53:33
【问题描述】:

我正在尝试通过 GitHub 将我的 Next.js/Express,js 后端应用程序部署到 Heroku,但是,我不断收到以下错误:

如果有人能帮我解决这个问题,将不胜感激!

谢谢。

-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> 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):  unspecified
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 14.x...
       Downloading and installing node 14.17.5...
       Using default npm version: 6.14.14
       
-----> Installing dependencies
       Installing node modules
       npm ERR! Error while executing:
       npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/securedeveloper/js-xlsx.git
       npm ERR! 
       npm ERR! Host key verification failed.
       npm ERR! fatal: Could not read from remote repository.
       npm ERR! 
       npm ERR! Please make sure you have the correct access rights
       npm ERR! and the repository exists.
       npm ERR! 
       npm ERR! exited with error code: 128
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.ScCS4/_logs/2021-08-22T17_21_36_340Z-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 Node.js app.
 !     Push failed

【问题讨论】:

标签: express heroku next.js


【解决方案1】:

我不知道这是否是一个好的解决方案,但是在删除 package-lock.json 并再次推送后,错误消失了

【讨论】:

  • 我不知道为什么会这样,但你让我很开心!
猜你喜欢
  • 2020-12-27
  • 2022-12-20
  • 1970-01-01
  • 2018-10-04
  • 2015-09-07
  • 1970-01-01
  • 2020-12-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多