Repository: microsoft/vscode-react-native

Issue #1152: Error while executing command 'react-native.cmd run-windows --proxy --no-packager': Error while executing command 'react-native.cmd run-windows --proxy --no-packager' (error code 101)
Created: 2019-10-30T08:31:39Z
Actual Behavior

Error debug

Expected Behavior

Debug and run react-native windows app

Software versions

React-Native VS Code extension version:
React native tools version 0.12.1
VSCode version:
1.39.2
x64
OS platform and version:
Windows 10 home
Version 1809
NodeJS version:
v12.9.1
React Native version:
0.60.0
Expo SDK version (include if relevant):

Outputs (Include if relevant)

Output of the Debug Console (View -> Toggle Debug Console):
OS: win32 x64
Adapter node: v10.11.0 x64
vscode-chrome-debug-core: 6.8.2
Could not debug. Error while executing command 'react-native.cmd run-windows --proxy --no-packager': Error while executing command 'react-native.cmd run-windows --proxy --no-packager' (error code 101)
Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
[Info] Starting Packager

┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│  Running Metro Bundler on port 8081.                                         │
│                                                                              │
│  Keep Metro running while developing on any JS projects. Feel free to        │
│  close this tab and run your own Metro instance if you prefer.               │
│                                                                              │
│  https://github.com/facebook/react-native                                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
c:\Users\manqo\OneDrive - Excior\Projects\Kola-Reservation\room_display_0_60_6
[Info] Packager started.
[Info] Prewarming bundle cache. This may take a while ...
[Info] About to get: http://localhost:8081/index.bundle?platform=windows
Loading dependency graph, done.
[Warning] The Bundle Cache was prewarmed.
[Info] Building and running application.
BUNDLE  [windows, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (568/568), done.
jest-haste-map: watch error:
Error: EBUSY: resource busy or locked, open 'c:\Users\manqo\OneDrive - Excior\Projects\Kola-Reservation\room_display_0_60_6\msbuild.ProjectImports.zip'
at Object.openSync (fs.js:448:3)
at Object.readFileSync (fs.js:350:35)
at getContent (c:\Users\manqo\OneDrive - Excior\Projects\Kola-Reservation\room_display_0_60_6\node_modules\jest-haste-map\build\worker.js:149:41)
at Object. (c:\Users\manqo\OneDrive - Excior\Projects\Kola-Reservation\room_display_0_60_6\node_modules\jest-haste-map\build\worker.js:199:9)
at Generator.next ()
at asyncGeneratorStep (c:\Users\manqo\OneDrive - Excior\Projects\Kola-Reservation\room_display_0_60_6\node_modules\jest-haste-map\build\worker.js:78:24)
at _next (c:\Users\manqo\OneDrive - Excior\Projects\Kola-Reservation\room_display_0_60_6\node_modules\jest-haste-map\build\worker.js:98:9)
at c:\Users\manqo\OneDrive - Excior\Projects\Kola-Reservation\room_display_0_60_6\node_modules\jest-haste-map\build\worker.js:103:7
at new Promise ()
at Object. (c:\Users\manqo\OneDrive - Excior\Projects\Kola-Reservation\room_display_0_60_6\node_modules\jest-haste-map\build\worker.js:95:12)
[Error] Error: Error while executing command 'react-native.cmd run-windows --proxy --no-packager': Error while executing command 'react-native.cmd run-windows --proxy --no-packager' (error code 101)

Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):
(node:12308) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ workbench.desktop.main.js:sourcemap:243
workbench.desktop.main.js:sourcemap:243 [Extension Host] (node:12308) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ workbench.desktop.main.js:sourcemap:243

Duplicate issue #905: Could not debug. Seems to be that you are trying to debug from within directory that is not a React Native project root. 
Created: 2019-02-06T13:58:31Z
Actual Behavior

Try to attach the packager
See error below

OS: darwin x64
Adapter node: v8.9.3 x64
vscode-chrome-debug-core: 3.23.11
******** Unhandled error in debug adapter - Unhandled promise rejection: Error: spawn react-native ENOENT
    at _errnoException (util.js:1024:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Could not debug. Seems to be that you are trying to debug from within directory that is not a React Native project root. 
 If so, please, follow these instructions: https://github.com/Microsoft/vscode-react-native/blob/master/doc/customization.md#project-structure. (error code 604)

Expected Behavior

Try to attach the packager
Debugger should attach to the packager

Software versions

React-Native VS Code extension version: 0.8.0
VSCode version: Version 1.30.2 (1.30.2)
OS platform and version: 10.14.2
NodeJS version: v8.15.0
React Native version: 0.55.3
Expo SDK version (include if relevant): nope

Outputs (Include if relevant)

Output of the Debug Console (View -> Toggle Debug Console):

OS: darwin x64
Adapter node: v8.9.3 x64
vscode-chrome-debug-core: 3.23.11
******** Unhandled error in debug adapter - Unhandled promise rejection: Error: spawn react-native ENOENT
    at _errnoException (util.js:1024:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Could not debug. Seems to be that you are trying to debug from within directory that is not a React Native project root. 
 If so, please, follow these instructions: https://github.com/Microsoft/vscode-react-native/blob/master/doc/customization.md#project-structure. (error code 604)


Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):

PASTE OUTPUT HERE


Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):

[Extension Host] debugger listening on port 44769
extensionService.ts:505 Overwriting extension /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2 with /Users/mlostek/.vscode/extensions/ms-vscode.node-debug2-1.31.3.
t._logMessageInConsole @ extensionService.ts:505
extensionHost.ts:235 Extension Host
extensionHost.ts:236 Debugger listening on ws://127.0.0.1:44769/9d1bd9e4-7cb9-41e0-9bdc-8e727790284b
For help see https://nodejs.org/en/docs/inspector

log.ts:157  INFO no standard startup: panel is active
console.ts:134 [Extension Host] [vscode-icons] v8.1.0 activated!
console.ts:134 [Extension Host] rejected promise not handled within 1 second
t.log @ console.ts:134
log.ts:169   ERR spawn react-native ENOENT: Error: spawn react-native ENOENT
	at _errnoException (util.js:1024:11)
	at Process.__dirname.ChildProcess._handle.onexit (internal/child_process.js:190:19)
	at onErrorNT (internal/child_process.js:372:16)
	at _combinedTickCallback (internal/process/next_tick.js:138:11)
	at process._tickCallback (internal/process/next_tick.js:180:9)

I am having a react native project in the root of VSCode.

Closing comment (2020-03-11T07:45:21Z): Hi @ARJUN-JAKKA . The first issue looks similar to #1152, and it is not connected to the extension since it is reproduced even without the extension. With respect to errors with building in Visual Studio, I'm afraid that this is not the correct place for resolving such questions. I suppose that it is better to ask your questions in React Native for Windows repository. Feel free to open new issues if they are about debugging React Native apps with React Native Tools extension in VS Code.