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)
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)
PASTE OUTPUT HERE
[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.
Hi @mlostekk and thanks for contacting us. Do you use nvm?
Yes, it was always working fine.. till 2 weeks ago
Also when trying to use your recommended setting, i see thi

Ah, good hint... NVM using 8.15.0 does not work. But 8.11.1 works
Also when trying to use your recommended setting, i see thi
To override RNT settings please use react-native-tools.SETTING, where SETTING is parameter you want to override? in your case it'd be projectRoot:

Yes, it was always working fine.. till 2 weeks ago
Please, try to run node -v command in system terminal outside VS Code and using VS Code terminal. If versions are different then run nvm alias default NODE_VER, where NODE_VER is needed version of node, restart VS Code and check again.
Please let us know if it helps.
Regardless of the setting "react-native-tools.projectRoot": ".", its not working with 8.15.0 set via nvm alias. Its only working with 8.11.1
@mlostekk did you install react-native-cli globally for v8.15.0?
oh yes. sorry, that was my fault. did not do that! thank you for your quick help
PS D:\project\app> react-native run-windows
โ Found NuGet Binary
โ Found MSBuild v16.0 at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin (16.4.29806.167)
I have turned on my Developer mode also
still getting this error
Also running using visual studio 2019
it is showing this error
i could not resolve this error
Loading dependency graph, done.
error: bundling failed: ReferenceError: SHA-1 for file D:\project\app\node_modules\react-native\package.json (D:\project\app\node_modules\react-native\package.json) is not computed
at DependencyGraph.getSha1 (D:\project\App\node_modules\metro\src\node-haste\DependencyGraph.js:259:13)
at D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:211:26
at Generator.next (
at asyncGeneratorStep (D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:46:24)
at _next (D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:66:9)
at D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:71:7
at new Promise (
at D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:63:12
at Transformer.transformFile (D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:236:7)
at D:\project\App\node_modules\metro\src\Bundler.js:87:34
BUNDLE [windows, dev] ./index.js โโโโโโโโโโโโโโโโ 81.1% (1222/1357), failed.
::1 - - [11/Mar/2020:06:13:44 +0000] "GET /index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true HTTP/1.1" 500 - "-" "-"
error: bundling failed: ReferenceError: SHA-1 for file D:\project\app\node_modules\react-native\package.json (D:\project\app\node_modules\react-native\package.json) is not computed
at DependencyGraph.getSha1 (D:\project\App\node_modules\metro\src\node-haste\DependencyGraph.js:259:13)
at D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:211:26
at Generator.next (
at asyncGeneratorStep (D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:46:24)
at _next (D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:66:9)
at D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:71:7
at new Promise (
at D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:63:12
at Transformer.transformFile (D:\project\App\node_modules\metro\src\DeltaBundler\Transformer.js:236:7)
at D:\project\App\node_modules\metro\src\Bundler.js:87:34
BUNDLE [windows, dev] ./index.js โโโโโโโโโโโโโโโโ 0.0% (0/1)
::1 - - [11/Mar/2020:06:13:44 +0000] "GET /index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true HTTP/1.1" 500 - BUNDLE [windows, dev] ./index.js โโโโโโโโโโโโโโโโ 0.0% (0/1),
failed.
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.
Most helpful comment
@mlostekk did you install react-native-cli globally for v8.15.0?