diff --git a/change/@react-native-windows-cli-4ed0aa4e-12d6-4d3c-9786-3cc5d30d7ec2.json b/change/@react-native-windows-cli-4ed0aa4e-12d6-4d3c-9786-3cc5d30d7ec2.json new file mode 100644 index 00000000000..88cec21c9a6 --- /dev/null +++ b/change/@react-native-windows-cli-4ed0aa4e-12d6-4d3c-9786-3cc5d30d7ec2.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Update warning deprecating paper", + "packageName": "@react-native-windows/cli", + "email": "hmalothu@microsoft.com", + "dependentChangeType": "none" +} diff --git a/packages/@react-native-windows/cli/src/commands/initWindows/initWindows.ts b/packages/@react-native-windows/cli/src/commands/initWindows/initWindows.ts index 0fbd9d8994a..807e0c1b498 100644 --- a/packages/@react-native-windows/cli/src/commands/initWindows/initWindows.ts +++ b/packages/@react-native-windows/cli/src/commands/initWindows/initWindows.ts @@ -161,6 +161,15 @@ export class InitWindows { spinner.info(`Using template '${this.options.template}'...`); if (!this.templates.has(this.options.template.replace(/[\\]/g, '/'))) { + // Check if user is trying to use an old architecture template + const isOldArchTemplate = this.options.template.startsWith('old'); + if (isOldArchTemplate) { + showOldArchitectureWarning(); + throw new CodedError( + 'InvalidTemplateName', + `The template '${this.options.template}' is no longer available. Please use 'cpp-app' template instead.`, + ); + } throw new CodedError( 'InvalidTemplateName', `Unable to find template '${this.options.template}'.`, diff --git a/packages/@react-native-windows/cli/src/utils/oldArchWarning.ts b/packages/@react-native-windows/cli/src/utils/oldArchWarning.ts index c055ca56c35..755c9fde834 100644 --- a/packages/@react-native-windows/cli/src/utils/oldArchWarning.ts +++ b/packages/@react-native-windows/cli/src/utils/oldArchWarning.ts @@ -12,13 +12,7 @@ import chalk from 'chalk'; export function showOldArchitectureWarning(): void { console.log( chalk.yellow( - `⚠️ This project is using the React Native (for Windows) Old Architecture. The old architecture will begin to be removed starting with react-native-windows@0.82.0.`, - ), - ); - console.log(); - console.log( - chalk.cyan( - '💡 It is strongly recommended to move to the new architecture as soon as possible to take advantage of improved performance, long-term support, and modern capabilities.', + `⚠️ The old architecture (Paper) is not supported in RNW version v0.82. Please enable your projects using new architecture (Fabric).`, ), ); console.log();