From 7366a866b381db6fc5615153e7788aa4828cfd96 Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Mon, 15 Nov 2021 05:38:42 -0800 Subject: [PATCH] chore: make CLI error message more descriptive (#32593) 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 [General] [Changed] - Improved error message in react.gradle Pull Request resolved: https://github.com/facebook/react-native/pull/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 --- react.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react.gradle b/react.gradle index 6f803dd5576f4b..38be8e8c35bc57 100644 --- a/react.gradle +++ b/react.gradle @@ -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"