microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
866e020b2c664db8b8c5bf972901bc2fc25ddd93

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/common/error/errorStrings.ts

369lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3import * as nls from "vscode-nls";
4import { InternalErrorCode } from "./internalErrorCode";
5nls.config({
6 messageFormat: nls.MessageFormat.bundle,
7 bundleFormat: nls.BundleFormat.standalone,
8})();
9const localize = nls.loadMessageBundle();
10
11export const ERROR_STRINGS = {
12 [InternalErrorCode.CommandFailed]: localize(
13 "CommandFailed",
14 "Error while executing command '{0}'",
15 ),
16 [InternalErrorCode.CommandFailedWithDetails]: localize(
17 "CommandFailed",
18 "Error while executing command '{0}'.\nDetails: {1}",
19 ),
20 [InternalErrorCode.DebuggingCommandFailed]: localize(
21 "DebuggingCommandFailed",
22 "Error while executing debugging command '{0}'",
23 ),
24 [InternalErrorCode.CommandFailedWithErrorCode]: localize(
25 "CommandFailedWithErrorCode",
26 "Command '{0}' failed with error code {1}",
27 ),
28 [InternalErrorCode.ExpectedIntegerValue]: localize(
29 "ExpectedIntegerValue",
30 "Expected an integer. Couldn't read {0}",
31 ),
32 [InternalErrorCode.PackagerStartFailed]: localize(
33 "PackagerStartFailed",
34 "Error while executing React Native Packager.",
35 ),
36 [InternalErrorCode.IOSDeployNotFound]: localize(
37 "IOSDeployNotFound",
38 "Unable to find ios-deploy. Please make sure to install it globally('brew install ios-deploy')",
39 ),
40 [InternalErrorCode.DeviceNotPluggedIn]: localize(
41 "DeviceNotPluggedIn",
42 "Unable to mount developer disk image.",
43 ),
44 [InternalErrorCode.DeveloperDiskImgNotMountable]: localize(
45 "DeveloperDiskImgNotMountable",
46 "Unable to mount developer disk image.",
47 ),
48 [InternalErrorCode.ApplicationLaunchFailed]: localize(
49 "ApplicationLaunchFailed",
50 "An error occurred while launching the application. {0}",
51 ),
52 [InternalErrorCode.CouldNotAttachToDebugger]: localize(
53 "CouldNotAttachToDebugger",
54 "An error occurred while attaching debugger to the application. {0}",
55 ),
56 [InternalErrorCode.ApplicationLaunchTimedOut]: localize(
57 "ApplicationLaunchTimedOut",
58 "Timeout launching application. Is the device locked?",
59 ),
60 [InternalErrorCode.IOSSimulatorNotLaunchable]: localize(
61 "IOSSimulatorNotLaunchable",
62 "Unable to launch iOS simulator. Try specifying a different target.",
63 ),
64 [InternalErrorCode.OpnPackagerLocationNotFound]: localize(
65 "OpnPackagerLocationNotFound",
66 "Opn package location not found",
67 ),
68 [InternalErrorCode.OpnPackagerNotFound]: localize(
69 "OpnPackagerNotFound",
70 "The package 'opn' was not found. {0}",
71 ),
72 [InternalErrorCode.PackageNotFound]: localize(
73 "PackageNotFound",
74 "Attempting to find package {0} failed with error: {1}",
75 ),
76 [InternalErrorCode.PlatformNotSupported]: localize(
77 "PlatformNotSupported",
78 "Platform '{0}' is not supported on host platform: {1}",
79 ),
80 [InternalErrorCode.ProjectVersionNotParsable]: localize(
81 "ProjectVersionNotParsable",
82 "Couldn't parse the version component of the package at {0}: version = {1}",
83 ),
84 [InternalErrorCode.ProjectVersionUnsupported]: localize(
85 "ProjectVersionUnsupported",
86 "Project version = {0}",
87 ),
88 [InternalErrorCode.CouldNotFindProjectVersion]: localize(
89 "CouldNotFindProjectVersion",
90 "Couldn't find React Native version in the current workspace or folder",
91 ),
92 [InternalErrorCode.ProjectVersionNotReadable]: localize(
93 "ProjectVersionNotReadable",
94 "Unable to read version = {0}",
95 ),
96 [InternalErrorCode.TelemetryInitializationFailed]: localize(
97 "TelemetryInitializationFailed",
98 "{0}. Couldn't initialize telemetry",
99 ),
100 [InternalErrorCode.ExtensionActivationFailed]: localize(
101 "ExtensionActivationFailed",
102 "Failed to activate the React Native Tools extension",
103 ),
104 [InternalErrorCode.DebuggerStubLauncherFailed]: localize(
105 "DebuggerStubLauncherFailed",
106 "Failed to setup the stub launcher for the debugger",
107 ),
108 [InternalErrorCode.IntellisenseSetupFailed]: localize(
109 "IntellisenseSetupFailed",
110 "Failed to setup IntelliSense",
111 ),
112 [InternalErrorCode.NodeDebuggerConfigurationFailed]: localize(
113 "NodeDebuggerConfigurationFailed",
114 "Failed to configure the node debugger location for the debugger",
115 ),
116 [InternalErrorCode.FailedToStopPackagerOnExit]: localize(
117 "FailedToStopPackagerOnExit",
118 "Failed to stop the packager while closing React Native Tools",
119 ),
120 [InternalErrorCode.FailedToRunOnAndroid]: localize(
121 "FailedToRunOnAndroid",
122 "Failed to run the application in Android",
123 ),
124 [InternalErrorCode.FailedToRunOnIos]: localize(
125 "FailedToRunOnIos",
126 "Failed to run the application in iOS",
127 ),
128 [InternalErrorCode.FailedToRunExponent]: localize(
129 "FailedToRunExponent",
130 "Failed to run the application in Expo",
131 ),
132 [InternalErrorCode.FailedToPublishToExpHost]: localize(
133 "FailedToRunExponent",
134 "Failed to publish the application to Exponent",
135 ),
136 [InternalErrorCode.FailedToStartPackager]: localize(
137 "FailedToStartPackager",
138 "Failed to start the React Native packager",
139 ),
140 [InternalErrorCode.FailedToStopPackager]: localize(
141 "FailedToStopPackager",
142 "Failed to stop the React Native packager",
143 ),
144 [InternalErrorCode.FailedToRestartPackager]: localize(
145 "FailedToRestartPackager",
146 "Failed to restart the React Native packager",
147 ),
148 [InternalErrorCode.DebuggingFailed]: localize("DebuggingFailed", "Cannot debug application"),
149 [InternalErrorCode.DebuggingFailedInNodeWrapper]: localize(
150 "DebuggingFailedInNodeWrapper",
151 "Cannot debug application due to an error in the internal Node Debugger",
152 ),
153 [InternalErrorCode.RNTempFolderDeletionFailed]: localize(
154 "RNTempFolderDeletionFailed",
155 "Couldn't delete the temporary folder {0}",
156 ),
157 [InternalErrorCode.CouldNotFindLocationOfNodeDebugger]: localize(
158 "CouldNotFindLocationOfNodeDebugger",
159 "Couldn't find the location of the node-debugger extension",
160 ),
161 [InternalErrorCode.CouldNotFindWorkspace]: localize(
162 "CouldNotFindWorkspace",
163 "Couldn't find any workspace or React Native project folder",
164 ),
165 [InternalErrorCode.ReactNativePackageIsNotInstalled]: localize(
166 "ReactNativePackageIsNotInstalled",
167 'Couldn\'t find react-native package in node_modules. Please, run "npm install" inside your project to install it.',
168 ),
169 [InternalErrorCode.ReactNativeWindowsIsNotInstalled]: localize(
170 "ReactNativeWindowsIsNotInstalled",
171 "It appears you don't have 'react-native-windows' package installed. Please proceed to https://github.com/microsoft/react-native-windows#getting-started for more info.",
172 ),
173 [InternalErrorCode.PackagerRunningInDifferentPort]: localize(
174 "PackagerRunningInDifferentPort",
175 "A packager cannot be started on port {0} because a packager process is already running on port {1}",
176 ),
177 [InternalErrorCode.ErrorWhileProcessingMessageInIPMSServer]: localize(
178 "ErrorWhileProcessingMessageInIPMSServer",
179 "An error ocurred while handling message: {0}",
180 ),
181 [InternalErrorCode.ErrorNoPipeFound]: localize(
182 "ErrorNoPipeFound",
183 "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?",
184 ),
185 [InternalErrorCode.NotAllSuccessPatternsMatched]: localize(
186 "NotAllSuccessPatternsMatched",
187 '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.',
188 ),
189 [InternalErrorCode.CouldNotParsePackageVersion]: localize(
190 "CouldNotParsePackageVersion",
191 "Couldn't parse the version component of the package at {0}: version = {1}",
192 ),
193 [InternalErrorCode.UnsupportedCommandStatus]: localize(
194 "UnsupportedCommandStatus",
195 "Unsupported command status",
196 ),
197 [InternalErrorCode.ExpectedExponentTunnelPath]: localize(
198 "ExpectedExponentTunnelPath",
199 "No link provided by Expo. Is your project correctly setup?",
200 ),
201 [InternalErrorCode.WorkspaceNotFound]: localize(
202 "WorkspaceNotFound",
203 "Error while working with workspace: {0}",
204 ),
205 [InternalErrorCode.RNVersionNotSupportedByExponent]: localize(
206 "RNVersionNotSupportedByExponent",
207 "React Native version not supported by Expo. Major versions supported: {0}",
208 ),
209 [InternalErrorCode.UserCancelledExpoLogin]: localize(
210 "UserCancelledExpoLogin",
211 "User canceled login.",
212 ),
213 [InternalErrorCode.NgrokIsNotInstalledGlobally]: localize(
214 "NgrokIsNotInstalledGlobally",
215 'It seems that "@expo/ngrok{0}" package isn\'t installed globally. This package is required to use Expo tunnels. Please run "npm i -g @expo/ngrok{0}" to install it globally.',
216 ),
217 [InternalErrorCode.CannotAttachToPackagerCheckPackagerRunningOnPort]: localize(
218 "CannotAttachToPackagerCheckPackagerRunningOnPort",
219 "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.",
220 ),
221 [InternalErrorCode.AnotherDebuggerConnectedToPackager]: localize(
222 "AnotherDebuggerConnectedToPackager",
223 "Another debugger is already connected to packager. Please close it before trying to debug with VSCode.",
224 ),
225 [InternalErrorCode.NotInReactNativeFolderError]: localize(
226 "NotInReactNativeFolderError",
227 "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#customization",
228 ),
229 [InternalErrorCode.SourcesStoragePathIsNullOrEmpty]: localize(
230 "SourcesStoragePathIsNullOrEmpty",
231 "The sourcesStoragePath argument was null or empty",
232 ),
233 [InternalErrorCode.AndroidCouldNotInstallTheAppOnAnyAvailibleDevice]: localize(
234 "AndroidCouldNotInstallTheAppOnAnyAvailibleDevice",
235 "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.",
236 ),
237 [InternalErrorCode.AndroidShellCommandTimedOut]: localize(
238 "AndroidShellCommandTimedOut",
239 "An Android shell command timed-out. Please retry the operation.",
240 ),
241 [InternalErrorCode.AndroidProjectNotFound]: localize(
242 "AndroidProjectNotFound",
243 "Android project not found.",
244 ),
245 [InternalErrorCode.AndroidMoreThanOneDeviceOrEmulator]: localize(
246 "AndroidMoreThanOneDeviceOrEmulator",
247 "More than one device/emulator",
248 ),
249 [InternalErrorCode.AndroidFailedToLaunchTheSpecifiedActivity]: localize(
250 "AndroidFailedToLaunchTheSpecifiedActivity",
251 "Failed to launch the specified activity. Try running application manually and start debugging using 'Attach to packager' launch configuration.",
252 ),
253 [InternalErrorCode.IOSFoundMoreThanOneExecutablesCleanupBuildFolder]: localize(
254 "IOSFoundMoreThanOneExecutablesCleanupBuildFolder",
255 "Found more than one executables in {0}. Please cleanup build folder or setup 'productName' launch option.",
256 ),
257 [InternalErrorCode.IOSCouldNotFoundExecutableInFolder]: localize(
258 "IOSCouldNotFoundExecutableInFolder",
259 "Could not found executable in {0}",
260 ),
261 [InternalErrorCode.WinRNMPPluginIsNotInstalled]: localize(
262 "WinRNMPPluginIsNotInstalled",
263 "'rnpm-plugin-windows' is not installed.",
264 ),
265 [InternalErrorCode.WinRunCommandFailed]: localize(
266 "WinRunCommandFailed",
267 "{0}\nPlease check the 'React Native: Run Windows' output channel for details",
268 ),
269 [InternalErrorCode.ReactDevtoolsIsNotInstalled]: localize(
270 "ReactDevtoolsIsNotInstalled",
271 "React Devtools is not installed. Run `npm install -g react-devtools` command in your terminal to install it.",
272 ),
273 [InternalErrorCode.CancellationTokenTriggered]: localize(
274 "CancellationTokenTriggered",
275 "Operation canceled",
276 ),
277 [InternalErrorCode.WorkspaceIsNotTrusted]: localize(
278 "WorkspaceIsNotTrusted",
279 'The workspace by the project path "{0}" should be trusted to use "{1}"',
280 ),
281 [InternalErrorCode.DebuggingWontWorkReloadJSAndReconnect]: localize(
282 "DebuggingWontWorkReloadJSAndReconnect",
283 "{0}. Debugging won't work: Try reloading the JS from inside the app, or Reconnect the VS Code debugger",
284 ),
285 [InternalErrorCode.ReconnectionToPackagerFailedCheckForErrorsOrRestartReactNative]: localize(
286 "ReconnectionToPackagerFailedCheckForErrorsOrRestartReactNative",
287 "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.",
288 ),
289 [InternalErrorCode.FailedToProcessMessageFromReactNativeApp]: localize(
290 "FailedToProcessMessageFromReactNativeApp",
291 "Failed to process message from the React Native app. Message:\n{0}",
292 ),
293 [InternalErrorCode.FailedToPrepareJSRuntimeEnvironment]: localize(
294 "FailedToPrepareJSRuntimeEnvironment",
295 "Failed to prepare the JavaScript runtime environment. Message:\n{0}",
296 ),
297 [InternalErrorCode.FailedToSendMessageToTheReactNativeApp]: localize(
298 "FailedToSendMessageToTheReactNativeApp",
299 "Failed to send message to the React Native app. Message:\n{0}",
300 ),
301 [InternalErrorCode.ReactNativeWorkerProcessThrownAnError]: localize(
302 "ReactNativeWorkerProcessThrownAnError",
303 "React Native worker process thrown an error",
304 ),
305 [InternalErrorCode.CouldntImportScriptAt]: localize(
306 "CouldntImportScriptAt",
307 "Couldn't import script at <{0}>",
308 ),
309 [InternalErrorCode.RNMessageWithMethodExecuteApplicationScriptDoesntHaveURLProperty]: localize(
310 "RNMessageWithMethodExecuteApplicationScriptDoesntHaveURLProperty",
311 "RNMessage with method 'executeApplicationScript' doesn't have 'url' property",
312 ),
313 [InternalErrorCode.CouldNotConnectToDebugTarget]: localize(
314 "CouldNotConnectToDebugTarget",
315 "Could not connect to the debug target at {0}: {1}",
316 ),
317 [InternalErrorCode.IOSCouldNotFoundDeviceForDirectDebugging]: localize(
318 "CannotAttachtoiOSDeviceDirectly",
319 'Unable to find iOS target device/simulator. Please check that "Settings > Safari > Advanced > Web Inspector = ON" or try specifying a different "port" parameter in launch.json. Also, please make sure that \'target\' property in your debug scenario is defined correctly.',
320 ),
321 [InternalErrorCode.FailedToStartAndroidEmulator]: localize(
322 "FailedToStartAndroidEmulator",
323 'The command "emulator -avd {0}" threw an exception: {1}',
324 ),
325 [InternalErrorCode.FailedToStartIOSSimulator]: localize(
326 "FailedToStartIOSSimulator",
327 'The command "xrun simctl boot {0}" threw an exception: {1}',
328 ),
329 [InternalErrorCode.AndroidThereIsNoAnyOnlineDebuggableTarget]: localize(
330 "AndroidThereIsNoAnyOnlineDebuggableTarget",
331 "There is no any Android debuggable online target",
332 ),
333 [InternalErrorCode.IOSThereIsNoAnyDebuggableTarget]: localize(
334 "IOSThereIsNoAnyDebuggableTarget",
335 "There is no any iOS debuggable target",
336 ),
337 [InternalErrorCode.TargetSelectionError]: localize(
338 "TargetSelectionError",
339 "The target launch finished with an exception: {0}",
340 ),
341 [InternalErrorCode.ReactNativemacOSIsNotInstalled]: localize(
342 "ReactNativemacOSIsNotInstalled",
343 "It appears you don't have 'react-native-macos' package installed. Please proceed to https://microsoft.github.io/react-native-windows/docs/rnm-getting-started for more info.",
344 ),
345 [InternalErrorCode.AndroidCouldNotStartLogCatMonitor]: localize(
346 "ErrorWhileStartMonitoringLogCat",
347 "Error while starting monitoring LogCat",
348 ),
349 [InternalErrorCode.AndroidCouldNotStopLogCatMonitor]: localize(
350 "ErrorWhileStopMonitoringLogCat",
351 "Error while stopping monitoring LogCat",
352 ),
353 [InternalErrorCode.AndroidCouldNotFindActiveLogCatMonitor]: localize(
354 "ErrorWhileSelectMonitoringLogCat",
355 "No active Android LogCat monitors found",
356 ),
357 [InternalErrorCode.CouldNotDirectDebugWithoutHermesEngine]: localize(
358 "CouldNotDirectDebugWithoutHermesEngine",
359 "Could not start direct debugging of the {0} application without Hermes engine enabled. Please check if Hermes engine is enabled in your project and your debugging configuration contains 'useHermesEngine' prop set to 'true'",
360 ),
361 [InternalErrorCode.CouldNotStartNetworkInspector]: localize(
362 "ErrorWhileStartNetworkInspector",
363 "Error while starting Network inspector",
364 ),
365 [InternalErrorCode.CouldNotStopNetworkInspector]: localize(
366 "ErrorWhileStopNetworkInspector",
367 "Error while stopping Network inspector",
368 ),
369};
370