1

In the project, I have cloned from my organization's GitLab, there is a module in the package.json as:

"react-native-device-info": "https://github.com/KarlosQ/react-native-device-info#master",

and respectively in the yarn.lock we have

"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"

For any reason that commit beebff8dc... does not exist at the master branch of the module.

Because of that, all builds in the GitLab pipeline fails.

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

How can I change it locally and push to the remote branch that affects the pipeline and build passes?

Clearing the Yarn cache locally did not help. deleting that module from yarn.lock causes other issues that my organization account is not recognized anymore and yarn install fails!

tk421
  • 5,775
  • 6
  • 23
  • 34
Amir-Mousavi
  • 4,273
  • 12
  • 70
  • 123
  • 1
    Did you try `yarn uninstall react-native-device-info && yarn add react-native-device-info@0.21.5`? It might be that the repo changed their history and you are locking on a, now, invalid git commit. – k0pernikus Feb 07 '19 at 11:02
  • @k0pernikus Actually that Worked, Thanks, I was thinking of more complex solutions :)) I have not merged yet but at least the branch build was successful – Amir-Mousavi Feb 07 '19 at 12:06

1 Answers1

0

Run:

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

The first one will remove the dependency from your node_modules, package.json and yarn.lock.

The second one will recover the version you are depending on, namely 0.21.5 as stated in your old yarn.lock.

You should not concern yourself with any specific commit, but should yarn handle the internals.

The missing commit was most likely deleted from the master branch of the external repository and hence will never be resolved properly.

k0pernikus
  • 60,309
  • 67
  • 216
  • 347