microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
1.9.2

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/common/error/errorStrings.ts

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