diff --git a/packages/amplify-cli-core/src/state-manager/pathManager.ts b/packages/amplify-cli-core/src/state-manager/pathManager.ts index fccdcea3826..648d4291fce 100644 --- a/packages/amplify-cli-core/src/state-manager/pathManager.ts +++ b/packages/amplify-cli-core/src/state-manager/pathManager.ts @@ -199,7 +199,11 @@ export class PathManager { private createNotInitializedError = (): Error => { const error = new Error( - "You are not working inside a valid Amplify project.\nUse 'amplify init' in the root of your app directory to initialize your project, or 'amplify pull' to pull down an existing project.", + ` + No Amplify backend project files detected within this folder. Either initialize a new Amplify project or pull an existing project. + - "amplify init" to initialize a new Amplify project + - "amplify pull " to pull your existing Amplify project. Find the in the AWS Console or Amplify Admin UI. + `, ); error.name = 'NotInitialized'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-project-meta.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-project-meta.ts index 297cced25d2..cdf05cd73cf 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-project-meta.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-project-meta.ts @@ -3,7 +3,11 @@ import { stateManager } from 'amplify-cli-core'; export function getProjectMeta() { if (!stateManager.metaFileExists()) { const error = new Error( - "You are not working inside a valid Amplify project.\nUse 'amplify init' in the root of your app directory to initialize your project, or 'amplify pull' to pull down an existing project.", + ` + No Amplify backend project files detected within this folder. Either initialize a new Amplify project or pull an existing project. + - "amplify init" to initialize a new Amplify project + - "amplify pull " to pull your existing Amplify project. Find the in the AWS Console or Amplify Admin UI. + `, ); error.name = 'NotInitialized'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/path-manager.ts b/packages/amplify-cli/src/extensions/amplify-helpers/path-manager.ts index 3635eac3592..b80ed2d290f 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/path-manager.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/path-manager.ts @@ -118,7 +118,11 @@ export function getCurrentAmplifyMetaFilePath(projectPath?) { function createNotInitializedError() { const error = new Error( - "You are not working inside a valid Amplify project.\nUse 'amplify init' in the root of your app directory to initialize your project, or 'amplify pull' to pull down an existing project.", + ` + No Amplify backend project files detected within this folder. Either initialize a new Amplify project or pull an existing project. + - "amplify init" to initialize a new Amplify project + - "amplify pull " to pull your existing Amplify project. Find the in the AWS Console or Amplify Admin UI. + `, ); error.name = 'NotInitialized'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/resource-status.ts b/packages/amplify-cli/src/extensions/amplify-helpers/resource-status.ts index 4a7c71ca6db..88f165a8a46 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/resource-status.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/resource-status.ts @@ -356,7 +356,11 @@ export async function getResourceStatus(category?, resourceName?, providerName?, amplifyMeta = stateManager.getBackendConfig(); } else { const error = new Error( - "You are not working inside a valid Amplify project.\nUse 'amplify init' in the root of your app directory to initialize your project, or 'amplify pull' to pull down an existing project.", + ` + No Amplify backend project files detected within this folder. Either initialize a new Amplify project or pull an existing project. + - "amplify init" to initialize a new Amplify project + - "amplify pull " to pull your existing Amplify project. Find the in the AWS Console or Amplify Admin UI. + `, ); error.name = 'NotInitialized';