microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
src/common/error/errorStrings.ts
76lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. |
| 3 | import * as nls from "vscode-nls"; |
| 4 | import {InternalErrorCode} from "./internalErrorCode"; |
| 5 | const localize = nls.loadMessageBundle(); |
| 6 | |
| 7 | export const ERROR_STRINGS = { |
| 8 | [InternalErrorCode.CommandFailed]: localize("CommandFailed", "Error while executing command '{0}'"), |
| 9 | [InternalErrorCode.CommandFailedWithErrorCode]: localize("CommandFailedWithErrorCode", "Command '{0}' failed with error code {1}"), |
| 10 | [InternalErrorCode.ExpectedIntegerValue]: localize("ExpectedIntegerValue", "Expected an integer. Couldn't read {0}"), |
| 11 | [InternalErrorCode.PackagerStartFailed]: localize("PackagerStartFailed", "Error while executing React Native Packager."), |
| 12 | [InternalErrorCode.IOSDeployNotFound]: localize("IOSDeployNotFound", "Unable to find ios-deploy. Please make sure to install it globally('npm install -g ios-deploy')"), |
| 13 | [InternalErrorCode.DeviceNotPluggedIn]: localize("DeviceNotPluggedIn", "Unable to mount developer disk image."), |
| 14 | [InternalErrorCode.DeveloperDiskImgNotMountable]: localize("DeveloperDiskImgNotMountable", "Unable to mount developer disk image."), |
| 15 | [InternalErrorCode.UnableToLaunchApplication]: localize("UnableToLaunchApplication", "Unable to launch application."), |
| 16 | [InternalErrorCode.ApplicationLaunchTimedOut]: localize("ApplicationLaunchTimedOut", "Timeout launching application. Is the device locked?"), |
| 17 | [InternalErrorCode.IOSSimulatorNotLaunchable]: localize("IOSSimulatorNotLaunchable", "Unable to launch iOS simulator. Try specifying a different target."), |
| 18 | [InternalErrorCode.OpnPackagerLocationNotFound]: localize("OpnPackagerLocationNotFound", "Opn package location not found"), |
| 19 | [InternalErrorCode.OpnPackagerNotFound]: localize("OpnPackagerNotFound", "The package 'opn' was not found. {0}"), |
| 20 | [InternalErrorCode.PackageNotFound]: localize("PackageNotFound", "Attempting to find package {0} failed with error: {1}"), |
| 21 | [InternalErrorCode.PlatformNotSupported]: localize("PlatformNotSupported", "Platform '{0}' is not supported on host platform: {1}"), |
| 22 | [InternalErrorCode.ProjectVersionNotParsable]: localize("ProjectVersionNotParsable", "Couldn't parse the version component of the package at {0}: version = {1}"), |
| 23 | [InternalErrorCode.ProjectVersionUnsupported]: localize("ProjectVersionUnsupported", "Project version = {0}"), |
| 24 | [InternalErrorCode.CouldNotFindProjectVersion]: localize("CouldNotFindProjectVersion", "Couldn't find React Native version in the current workspace or folder"), |
| 25 | [InternalErrorCode.ProjectVersionNotReadable]: localize("ProjectVersionNotReadable", "Unable to read version = {0}"), |
| 26 | [InternalErrorCode.TelemetryInitializationFailed]: localize("TelemetryInitializationFailed", "{0}. Couldn't initialize telemetry"), |
| 27 | [InternalErrorCode.ExtensionActivationFailed]: localize("ExtensionActivationFailed", "Failed to activate the React Native Tools extension"), |
| 28 | [InternalErrorCode.DebuggerStubLauncherFailed]: localize("DebuggerStubLauncherFailed", "Failed to setup the stub launcher for the debugger"), |
| 29 | [InternalErrorCode.IntellisenseSetupFailed]: localize("IntellisenseSetupFailed", "Failed to setup IntelliSense"), |
| 30 | [InternalErrorCode.NodeDebuggerConfigurationFailed]: localize("NodeDebuggerConfigurationFailed", "Failed to configure the node debugger location for the debugger"), |
| 31 | [InternalErrorCode.FailedToStopPackagerOnExit]: localize("FailedToStopPackagerOnExit", "Failed to stop the packager while closing React Native Tools"), |
| 32 | [InternalErrorCode.FailedToRunOnAndroid]: localize("FailedToRunOnAndroid", "Failed to run the application in Android"), |
| 33 | [InternalErrorCode.FailedToRunOnIos]: localize("FailedToRunOnIos", "Failed to run the application in iOS"), |
| 34 | [InternalErrorCode.FailedToRunExponent]: localize("FailedToRunExponent", "Failed to run the application in Expo"), |
| 35 | [InternalErrorCode.FailedToPublishToExpHost]: localize("FailedToRunExponent", "Failed to publish the application to Exponent"), |
| 36 | [InternalErrorCode.FailedToStartPackager]: localize("FailedToStartPackager", "Failed to start the React Native packager"), |
| 37 | [InternalErrorCode.FailedToStopPackager]: localize("FailedToStopPackager", "Failed to stop the React Native packager"), |
| 38 | [InternalErrorCode.FailedToRestartPackager]: localize("FailedToRestartPackager", "Failed to restart the React Native packager"), |
| 39 | [InternalErrorCode.DebuggingFailed]: localize("DebuggingFailed", "Cannot debug application"), |
| 40 | [InternalErrorCode.DebuggingFailedInNodeWrapper]: localize("DebuggingFailedInNodeWrapper", "Cannot debug application due to an error in the internal Node Debugger"), |
| 41 | [InternalErrorCode.RNTempFolderDeletionFailed]: localize("RNTempFolderDeletionFailed", "Couldn't delete the temporary folder {0}"), |
| 42 | [InternalErrorCode.CouldNotFindLocationOfNodeDebugger]: localize("CouldNotFindLocationOfNodeDebugger", "Couldn't find the location of the node-debugger extension"), |
| 43 | [InternalErrorCode.CouldNotFindWorkspace]: localize("CouldNotFindWorkspace", "Couldn't find any workspace or React Native project folder"), |
| 44 | [InternalErrorCode.ReactNativePackageIsNotInstalled]: localize("ReactNativePackageIsNotInstalled", "Couldn't find react-native package in node_modules. Please, run \"npm install\" inside your project to install it."), |
| 45 | [InternalErrorCode.PackagerRunningInDifferentPort]: localize("PackagerRunningInDifferentPort", "A packager cannot be started on port {0} because a packager process is already running on port {1}"), |
| 46 | [InternalErrorCode.ErrorWhileProcessingMessageInIPMSServer]: localize("ErrorWhileProcessingMessageInIPMSServer", "An error ocurred while handling message: {0}"), |
| 47 | [InternalErrorCode.ErrorNoPipeFound]: localize("ErrorNoPipeFound", "Unable to set up communication with VSCode react-native extension. Is this a react-native project, and have you made sure that the react-native npm package is installed at the root?"), |
| 48 | [InternalErrorCode.NotAllSuccessPatternsMatched]: localize("NotAllSuccessPatternsMatched", "Unknown error: not all success patterns were matched. \n It means that \"react-native run-{0}\" command failed. \n Please, check the View -> Toggle Output -> React Native, \n View -> Toggle Output -> React Native: Run {1} output windows."), |
| 49 | [InternalErrorCode.CouldNotParsePackageVersion]: localize("CouldNotParsePackageVersion", "Couldn't parse the version component of the package at {0}: version = {1}"), |
| 50 | [InternalErrorCode.UnsupportedCommandStatus]: localize("UnsupportedCommandStatus", "Unsupported command status"), |
| 51 | [InternalErrorCode.ExpectedExponentTunnelPath]: localize("ExpectedExponentTunnelPath", "No link provided by Expo. Is your project correctly setup?"), |
| 52 | [InternalErrorCode.WorkspaceNotFound]: localize("WorkspaceNotFound", "Error while working with workspace: {0}"), |
| 53 | [InternalErrorCode.RNVersionNotSupportedByExponent]: localize("RNVersionNotSupportedByExponent", "React Native version not supported by Expo. Major versions supported: {0}"), |
| 54 | [InternalErrorCode.UserCancelledExpoLogin]: localize("UserCancelledExpoLogin", "User canceled login."), |
| 55 | [InternalErrorCode.CannotAttachToPackagerCheckPackagerRunningOnPort]: localize("CannotAttachToPackagerCheckPackagerRunningOnPort", "Cannot attach to packager. Are you sure there is a packager and it is running in the port {0}? If your packager is configured to run in another port make sure to add that to the settings.json."), |
| 56 | [InternalErrorCode.AnotherDebuggerConnectedToPackager]: localize("AnotherDebuggerConnectedToPackager", "Another debugger is already connected to packager. Please close it before trying to debug with VSCode."), |
| 57 | [InternalErrorCode.NotInReactNativeFolderError]: localize("NotInReactNativeFolderError", "Seems to be that you are trying to debug from within directory that is not a React Native project root. \n If so, please, follow these instructions: https://github.com/Microsoft/vscode-react-native/blob/master/doc/customization.md#project-structure."), |
| 58 | [InternalErrorCode.SourcesStoragePathIsNullOrEmpty]: localize("SourcesStoragePathIsNullOrEmpty", "The sourcesStoragePath argument was null or empty"), |
| 59 | [InternalErrorCode.AndroidCouldNotInstallTheAppOnAnyAvailibleDevice]: localize("AndroidCouldNotInstallTheAppOnAnyAvailibleDevice", "Could not install the app on any available device. Make sure you have a correctly \n configured device or emulator running. See https://facebook.github.io/react-native/docs/android-setup.html."), |
| 60 | [InternalErrorCode.AndroidShellCommandTimedOut]: localize("AndroidShellCommandTimedOut", "An Android shell command timed-out. Please retry the operation."), |
| 61 | [InternalErrorCode.AndroidProjectNotFound]: localize("AndroidProjectNotFound", "Android project not found."), |
| 62 | [InternalErrorCode.AndroidMoreThanOneDeviceOrEmulator]: localize("AndroidMoreThanOneDeviceOrEmulator", "More than one device/emulator"), |
| 63 | [InternalErrorCode.AndroidFailedToLaunchTheSpecifiedActivity]: localize("AndroidFailedToLaunchTheSpecifiedActivity", "Failed to launch the specified activity. Try running application manually and start debugging using 'Attach to packager' launch configuration."), |
| 64 | [InternalErrorCode.IOSFoundMoreThanOneExecutablesCleanupBuildFolder]: localize("IOSFoundMoreThanOneExecutablesCleanupBuildFolder", "Found more than one executables in {0}. Please cleanup build folder or setup 'productName' launch option."), |
| 65 | [InternalErrorCode.IOSCouldNotFoundExecutableInFolder]: localize("IOSCouldNotFoundExecutableInFolder", "Could not found executable in {0}"), |
| 66 | [InternalErrorCode.WinRNMPPluginIsNotInstalled]: localize("WinRNMPPluginIsNotInstalled", "'rnpm-plugin-windows' is not installed."), |
| 67 | [InternalErrorCode.ReactDevtoolsIsNotInstalled]: localize("ReactDevtoolsIsNotInstalled", "React Devtools is not installed. Run `npm install -g react-devtools` command in your terminal to install it."), |
| 68 | [InternalErrorCode.DebuggingWontWorkReloadJSAndReconnect]: localize("DebuggingWontWorkReloadJSAndReconnect", "{0}. Debugging won't work: Try reloading the JS from inside the app, or Reconnect the VS Code debugger"), |
| 69 | [InternalErrorCode.ReconnectionToPackagerFailedCheckForErrorsOrRestartReactNative]: localize("ReconnectionToPackagerFailedCheckForErrorsOrRestartReactNative", "Reconnection to the proxy (Packager) failed. Please check the output window for Packager errors, if any. If failure persists, please restart the React Native debugger."), |
| 70 | [InternalErrorCode.FailedToProcessMessageFromReactNativeApp]: localize("FailedToProcessMessageFromReactNativeApp", "Failed to process message from the React Native app. Message:\n{0}"), |
| 71 | [InternalErrorCode.FailedToPrepareJSRuntimeEnvironment]: localize("FailedToPrepareJSRuntimeEnvironment", "Failed to prepare the JavaScript runtime environment. Message:\n{0}"), |
| 72 | [InternalErrorCode.FailedToSendMessageToTheReactNativeApp]: localize("FailedToSendMessageToTheReactNativeApp", "Failed to send message to the React Native app. Message:\n{0}"), |
| 73 | [InternalErrorCode.ReactNativeWorkerProcessThrownAnError]: localize("ReactNativeWorkerProcessThrownAnError", "React Native worker process thrown an error"), |
| 74 | [InternalErrorCode.CouldntImportScriptAt]: localize("CouldntImportScriptAt", "Couldn't import script at <{0}>"), |
| 75 | [InternalErrorCode.RNMessageWithMethodExecuteApplicationScriptDoesntHaveURLProperty]: localize("RNMessageWithMethodExecuteApplicationScriptDoesntHaveURLProperty", "RNMessage with method 'executeApplicationScript' doesn't have 'url' property"), |
| 76 | }; |
| 77 | |