我遇到了 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.
我已经调试了几个小时了,但似乎找不到解决方案。
这里可能发生了什么?
最佳答案
尝试运行yarn add epoberezkin/fast-deep-equal
Yarn 似乎试图从错误的 github 存储库安装该库。这可能是 Heroku 的错误消息没有告诉您正确的模块名称的错误。
关于javascript - 无法部署到 Heroku,未进行任何更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61085975/