Skip to content

[react-native-git-upgrade] Support Yarn workspaces #16666

Description

@blackxored

react-native-git-upgrade: 0.2.7
yarn: 1.2.1
lerna: 2.5.1

In a monorepo setup using yarn workspaces, react-native-git-upgrade blows since it tries to read the root package.json.

git-upgrade info Check for updates
git-upgrade info Using yarn 1.2.1
git-upgrade info Read package.json files
git-upgrade ERR! An error occurred during upgrade:
git-upgrade ERR! TypeError: Cannot read property 'react-native' of undefined
    at Object.<anonymous> (/usr/local/lib/node_modules/react-native-git-upgrade/cliEntry.js:244:29)
    at Generator.next (<anonymous>)
    at step (/usr/local/lib/node_modules/react-native-git-upgrade/cliEntry.js:171:191)
    at /usr/local/lib/node_modules/react-native-git-upgrade/cliEntry.js:171:361
    at tryCallOne (/usr/local/lib/node_modules/react-native-git-upgrade/node_modules/promise/lib/core.js:37:12)
    at /usr/local/lib/node_modules/react-native-git-upgrade/node_modules/promise/lib/core.js:123:15
    at flush (/usr/local/lib/node_modules/react-native-git-upgrade/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

I realize this setup would be hard to detect, which is why I propose a way to specify a) what your root directory is b) an option to specify which package.json to use, or a combination of both.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions