首页 > 解决方案 > 无法部署到 Heroku,未进行任何更改

问题描述

我遇到了 Heroku 的部署问题。昨天,我能够毫无问题地进行部署——今天早上,我在 MongoDB 上构建了一个新集群,并使用新的连接字符串将更改推送到 git。没有进行其他更改。

推送到 git 后,我​​跑了git push heroku master,遇到以下错误:

. . .
remote:        added 1812 packages from 857 contributors and audited 932744 packages in 66.192s
remote:        
remote:        65 packages are looking for funding
remote:          run `npm fund` for details
remote:        
remote:        found 0 vulnerabilities
remote:        
remote:        
remote:        > client@0.1.0 build /tmp/build_3fd8925946ec2800b115594ca20fb426/client
remote:        > react-scripts build
remote:        
remote:        Creating an optimized production build...
remote:        Failed to compile.
remote:        
remote:        ./node_modules/simple-react-lightbox/dist/index.es.js
remote:        Cannot find module: 'fast-deep-equal/react'. Make sure this package is installed.
remote:        
remote:        You can install this package by running: yarn add fast-deep-equal/react.
. . .

自然,我做的第一件事就是尝试yarn add fast-deep-equal/react按照建议运行,这引发了下一个错误,

error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://git@github.com/fast-deep-equal/react.git
Directory: /Users/me/my-app
Output:
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我已经调试了几个小时了,我似乎无法找到解决方案。

这里会发生什么?

标签: javascriptreactjsheroku

解决方案


尝试运行yarn add epoberezkin/fast-deep-equal

Yarn 似乎试图从错误的 github 存储库安装库。这可能是 Heroku 的错误消息没有告诉您正确的模块名称的错误。


推荐阅读