docker - 更新 yarn .lock 并推送到远程以影响 docker 实例

标签 docker git-commit yarnpkg git-push yarn-lock.json

在项目中,我是从我组织的 GitLab 中克隆出来的,package.json 中有一个模块作为:
"react-native-device-info": "https://github.com/KarlosQ/react-native-device-info#master",
并分别在 yarn.lock我们有

"react-native-device-info@https://github.com/KarlosQ/react-native-device-info#master":
  version "0.21.5"
  resolved "https://github.com/KarlosQ/react-native-device-info#beebff8dc284decfba917f2c6d30d0e535cc4002"

出于任何原因提交 beebff8dc...在模块的主分支中不存在。

因此,GitLab 管道中的所有构建都会失败。

error Couldn't find match for "beebff8dc..." in ....



如何在本地更改它并推送到影响管道和构建 channel 的远程分支?

在本地清除 Yarn 缓存并没有帮助。从 yarn.lock 删除该模块会导致我的组织帐户不再被识别和 yarn install 的其他问题失败!

最佳答案

跑:

yarn uninstall react-native-device-info && yarn add react-native-device-info@0.21.5

第一个将从您的 node_modules、package.json 和 yarn.lock 中删除依赖项。

第二个将恢复您所依赖的版本,即旧 yarn.lock 中所述的 0.21.5。

你不应该关心任何特定的提交,但应该由 yarn 处理内部。

丢失的提交很可能已从外部存储库的主分支中删除,因此永远无法正确解决。

关于docker - 更新 yarn .lock 并推送到远程以影响 docker 实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54571742/

相关文章:

Git 恢复不工作

reactjs - GitLab CI Pipeline Job 给出错误 JavaScript heap out of memory

apache - create-react-app 在 LAMP/XAMPP/WAMP 上构建部署

docker - Windows Server 2016 上的容器到容器访问 Windows 容器问题

python - 从本地机器上的 psycopg2 连接到 Docker 上的 PostgreSQL 数据库

docker - 使用 docker swarm 进行负载平衡

java - Docker Java 内存使用情况

git - 将代码从一个仓库的一个分支推送到另一个仓库的另一个分支

Git:在不提交的情况下切换工作区(计算机)

npm - 有没有办法停止 yarn 最新版本检查?