Skip to content

Commit

Permalink
chore: make CLI error message more descriptive (#32593)
Browse files Browse the repository at this point in the history
Summary:
motivation: I have a custom setup and needed to provide `react.cliPath`. I mistakenly provided path to `react-native-community/cli` which resulted into JS bundle not being generated. This error message provides a little more detail.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Changed] - Improved error message in react.gradle

Pull Request resolved: #32593

Test Plan: I guess it's not needed in this case

Reviewed By: ShikaSD

Differential Revision: D32427929

Pulled By: cortinico

fbshipit-source-id: 2be340a8be15c8ec08873c0368a36b449c8b5030
  • Loading branch information
vonovak authored and facebook-github-bot committed Nov 15, 2021
1 parent a507998 commit 7366a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def detectCliPath(config) {
return "${projectDir}/../../node_modules/react-native/cli.js"
}
throw new Exception("Couldn't determine CLI location. " +
"Please set `project.ext.react.cliPath` to the path of the react-native cli.js");
"Please set `project.ext.react.cliPath` to the path of the react-native cli.js file. This file typically resides in `node_modules/react-native/cli.js`");
}

def composeSourceMapsPath = config.composeSourceMapsPath ?: "node_modules/react-native/scripts/compose-source-maps.js"
Expand Down

0 comments on commit 7366a86

Please sign in to comment.