You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running yarn add against a GitHub dependency correctly installs the specified branch/commit of that dependency. But when using yarn install to get the dependency again (e.g. on new machine or after cleaning node_modules), the wrong version is installed.
If the current behavior is a bug, please provide the steps to reproduce.
$ echo {} > package.json
$ yarn add LinusU/react-native-popup-dialog#rn-modal
✨ Done in 1.31s.
$ shasum -a 256 node_modules/react-native-popup-dialog/dist/PopupDialog.js
38143348b4c9e5ac42d67d6e5ce89c764968d073e9565fd453dccce9795c1920
$ rm -rf node_modules
$ yarn
✨ Done in 0.87s.
$ shasum -a 256 node_modules/react-native-popup-dialog/dist/PopupDialog.js
e04749ea0bbeb8d07b11f7f8279fdfe00a568b9625a538e04590b5ced4844323
As we can see, the first call to yarn add correctly installs the branch rn-modal from GitHub. However, when cleaning out node_modules and installing again, it takes the version from npm instead.
This is the relevant parts from package.json and yarn.lock:
Yeah same problem for me here. Seems to be related to branches, because on default branches it works as expected. And Yarn always seems to be checking out the first commit on the branch. After yarn upgrade it's the newest version again, but this really isn't the solution ^^.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Running
yarn add
against a GitHub dependency correctly installs the specified branch/commit of that dependency. But when usingyarn install
to get the dependency again (e.g. on new machine or after cleaning node_modules), the wrong version is installed.If the current behavior is a bug, please provide the steps to reproduce.
As we can see, the first call to
yarn add
correctly installs the branchrn-modal
from GitHub. However, when cleaning out node_modules and installing again, it takes the version from npm instead.This is the relevant parts from
package.json
andyarn.lock
:What is the expected behavior?
I expected the exact same package to be installed both times.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: