OS: win32 x64
Adapter node: v7.9.0 x64
vscode-chrome-debug-core: 3.17.3
Starting debugger app worker.
Established a connection with the Proxy (Packager) to the React Native application
Debugger worker loaded runtime on port 27317
Couldn't import script at <http://localhost:8081/index.bundle?platform=android&dev=true&minify=false>. Debugging won't work: Try reloading the JS from inside the app, or Reconnect the VS Code debugger: {"message":"Cannot find entry file index.js in any of the roots: [\"c:\\\\Users\\\\Admin\\\\Documents\\\\GitHub\\\\elephantbrain\"]","name":"NotFoundError","type":"NotFoundError","status":404,"errors":[{"description":"Cannot find entry file index.js in any of the roots: [\"c:\\\\Users\\\\Admin\\\\Documents\\\\GitHub\\\\elephantbrain\"]"}],"stack":"NotFoundError: Cannot find entry file index.js in any of the roots: [\"c:\\\\Users\\\\Admin\\\\Documents\\\\GitHub\\\\elephantbrain\"]\n at DependencyGraph.getAbsolutePath (c:\\Users\\Admin\\Documents\\GitHub\\elephantbrain\\node_modules\\metro\\src\\node-haste\\DependencyGraph.js:317:11)\n at c:\\Users\\Admin\\Documents\\GitHub\\elephantbrain\\node_modules\\metro\\src\\DeltaBundler\\DeltaCalculator.js:280:416\n at Generator.next (<anonymous>)\n at step (c:\\Users\\Admin\\Documents\\GitHub\\elephantbrain\\node_modules\\metro\\src\\DeltaBundler\\DeltaCalculator.js:11:445)\n at c:\\Users\\Admin\\Documents\\GitHub\\elephantbrain\\node_modules\\metro\\src\\DeltaBundler\\DeltaCalculator.js:11:605\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:188:7)"}
[Info] Starting Packager
Scanning folders for symlinks in c:\Users\Admin\Documents\GitHub\elephantbrain\node_modules (57ms)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ 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\Admin\Documents\GitHub\elephantbrain
Metro Bundler ready.
[Info] Packager started.
[Info] Prewarming bundle cache. This may take a while ...
[Info] Entry point at c:\Users\Admin\Documents\GitHub\elephantbrain\index.android.js doesn't exist. Skipping prewarming...
[Info] Building and running application.
[Info] Enable JS Debugging
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Documents\GitHub\elephantbrain"
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Documents\GitHub\elephantbrain"
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Documents\GitHub\elephantbrain"
Loading dependency graph, done.
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Documents\GitHub\elephantbrain"
error: bundling failed: NotFoundError: Cannot find entry file index.js in any of the roots: ["c:\\Users\\Admin\\Documents\\GitHub\\elephantbrain"]
at DependencyGraph.getAbsolutePath (c:\Users\Admin\Documents\GitHub\elephantbrain\node_modules\metro\src\node-haste\DependencyGraph.js:317:11)
at c:\Users\Admin\Documents\GitHub\elephantbrain\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:280:416
at Generator.next (<anonymous>)
at step (c:\Users\Admin\Documents\GitHub\elephantbrain\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:11:445)
at c:\Users\Admin\Documents\GitHub\elephantbrain\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:11:605
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
BUNDLE [android, dev] ./index.js โโโโโโโโโโโโโโโโ 0.0% (0/1), failed.
INFO no standard startup: panel is active
TMSyntax.ts:44 Overwriting grammar scope name to file mapping for scope source.sql.
Old grammar file: c:\Program Files\Microsoft VS Code\resources\app\extensions\sql\syntaxes\sql.tmLanguage.json.
New grammar file: c:\Users\Admin\.vscode\extensions\ms-mssql.mssql-1.3.1\syntaxes\SQL.plist
e.register @ TMSyntax.ts:44
notificationsAlerts.ts:42 [Toggl] Api key not defined
e.onDidNotificationChange @ notificationsAlerts.ts:42
console.ts:136 [Extension Host] Activating extension 'armaklan.vscode-toggl' failed: You should either specify apiToken or username and password.
t.log @ console.ts:136
console.ts:136 [Extension Host] Activating extension `armaklan.vscode-toggl` failed: You should either specify apiToken or username and password
t.log @ console.ts:136
console.ts:136 [Extension Host] Here is the error stack: Error: You should either specify apiToken or username and password
at validateOptions (C:\Users\Admin\.vscode\extensions\armaklan.vscode-toggl-0.0.5\node_modules\toggl-api\lib\client.js:333:11)
at new TogglClient (C:\Users\Admin\.vscode\extensions\armaklan.vscode-toggl-0.0.5\node_modules\toggl-api\lib\client.js:34:5)
at new TogglClient (C:\Users\Admin\.vscode\extensions\armaklan.vscode-toggl-0.0.5\toggl.js:7:20)
at Object.<anonymous> (C:\Users\Admin\.vscode\extensions\armaklan.vscode-toggl-0.0.5\extension.js:17:18)
at Object.<anonymous> (C:\Users\Admin\.vscode\extensions\armaklan.vscode-toggl-0.0.5\extension.js:131:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Function.o._load (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:735:300)
at Module.require (module.js:498:17)
at Module.patchedRequire [as require] (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\node_modules\diagnostic-channel\dist\src\patchRequire.js:14:46)
at require (internal/module.js:20:19)
at Function.i [as __$__nodeRequire] (c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:30:770)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:759:932
at t._doActivateExtension (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:760:25)
at t._activateExtension (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:758:910)
at Object.actualActivateExtension (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:756:770)
at e._activateExtension (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:444:188)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:443:757
at Array.map (native)
at e._activateExtensions (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:443:732)
at e.activateByEvent (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:442:14)
at t.activateByEvent (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:757:139)
at t.handleEagerExtensions (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:780:392)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:779:608
at Object.g [as _notify] (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:76:971)
at Object.enter (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:80:277)
at n.Class.derive._oncancel._run (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:84)
at n.Class.derive._oncancel._completed (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:81:523)
at e.open (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:106:990)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:756:808
at Object.g [as _notify] (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:76:971)
at Object.enter (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:80:277)
at n.Class.derive._oncancel._run (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:84)
at n.Class.derive._oncancel._completed (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:81:523)
at c (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:84:1011)
at K.then.o.(anonymous function) (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:85:205)
at Object.g [as _notify] (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:76:971)
at Object.enter (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:80:277)
at n.Class.derive._oncancel._run (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:82:84)
at n.Class.derive._oncancel._completed (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:81:523)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:110:917
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:144:48
at LOOP (fs.js:1728:14)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
extensionService.ts:870 Activating extension 'armaklan.vscode-toggl' failed: You should either specify apiToken or username and password.
w._logMessageInConsole @ extensionService.ts:870
console.ts:136 [Extension Host] (node:11108) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ console.ts:136
713console.ts:136 [Extension Host] INVALID text edit -> must be single line and on the same line
t.log @ console.ts:136
webviewElement.ts:132 [Embedded Page] Refused to load the image 'http://vsmarketplacebadge.apphb.com/version-short/EQuimper.react-native-react-redux-snippets-for-es6-es7-version-standard.svg' because it violates the following Content Security Policy directive: "img-src https: data:".
webviewElement.ts:132 [Embedded Page] Refused to load the image 'http://vsmarketplacebadge.apphb.com/installs-short/EQuimper.react-native-react-redux-snippets-for-es6-es7-version-standard.svg' because it violates the following Content Security Policy directive: "img-src https: data:".
webviewElement.ts:132 [Embedded Page] Refused to load the image 'http://vsmarketplacebadge.apphb.com/rating-short/EQuimper.react-native-react-redux-snippets-for-es6-es7-version-standard.svg' because it violates the following Content Security Policy directive: "img-src https: data:".
notificationsAlerts.ts:42 ESLint: ESLint configuration in C:\Users\Admin\Documents\GitHub\elephantbrain\.eslintrc is invalid: - Unexpected top-level property "semi". . Please see the 'ESLint' output channel for details.
e.onDidNotificationChange @ notificationsAlerts.ts:42
console.ts:136 [Extension Host] ApplicationInsights:Sender Array(1)
t.log @ console.ts:136
log.ts:171 ERR Cannot read property 'lineNumber' of null: TypeError: Cannot read property 'lineNumber' of null
at Object.e.to (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:641:780)
at e.provideHover (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:690:71)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:704:93
at e._withAdapter (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:701:385)
at e.$provideHover (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:704:55)
at e._doInvokeHandler (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:636:832)
at e._invokeHandler (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:636:550)
at e._receiveRequest (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:635:631)
at e._receiveOneMessage (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:635:400)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:634:315
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:637:395
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:95:432
at e.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:96:764)
at Socket.<anonymous> (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:154:338)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at Pipe.onread (net.js:560:20)
console.ts:136 [Extension Host] 11:31:03 - VimState: invalid value for set cursor position. This is probably bad?
2console.ts:136 [Extension Host] Error: Illegal value for `line`
at t._lineAt (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:476:662)
at Object.lineAt (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:475:373)
at Function.getLineAt (C:\Users\Admin\.vscode\extensions\vscodevim.vim-0.12.0\out\src\textEditor.js:121:56)
at ModeHandler.<anonymous> (C:\Users\Admin\.vscode\extensions\vscodevim.vim-0.12.0\out\src\mode\modeHandler.js:485:67)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Admin\.vscode\extensions\vscodevim.vim-0.12.0\out\src\mode\modeHandler.js:4:58)
at <anonymous>
t.log @ console.ts:136
This is the same issue as https://github.com/Microsoft/vscode-react-native/issues/674. The workaround is to just start the bundler in the terminal and then let debugging hook in to that but it would be nice if it all launched with one command.
Hi @allforabit,
Please reset your cache and try again
https://gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d
Thanks!
@allforabit any results?
Hi apologies I haven't had a chance to check just yet but will do at some point today or tomorrow. Thanks!
Hi @iTOYS apologies about the delay. I've cleared out the cache and even started a new project (based on react-native init MyProject and am still having no luck. Please note the instructions to clear the cache aren't specific to Windows and are a bit of date as far as I can see. I followed along as closely as possible and manually removed any folders that might have been causing problems. I also cleared out my global yarn dependencies and reinstalled react-native-cli globally. I have tried on my mac and I'm not getting the issue. On Windows I only experience problems when trying to run from vscode-react-native. Starting with react-native run-android works fine. Here's the output from my attempt just now to start the app:
[Info] Starting Packager
Scanning folders for symlinks in c:\Users\Admin\Desktop\RNTest\node_modules (31ms)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ 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\Admin\Desktop\RNTest
Metro Bundler ready.
[Info] Packager started.
[Info] Prewarming bundle cache. This may take a while ...
[Info] Entry point at c:\Users\Admin\Desktop\RNTest\index.android.js doesn't exist. Skipping prewarming...
[Info] Building and running application.
Loading dependency graph, done.
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Desktop\RNTest"
[Info] Enable JS Debugging
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Desktop\RNTest"
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Desktop\RNTest"
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Desktop\RNTest"
error: bundling failed: NotFoundError: Cannot find entry file index.js in any of the roots: ["c:\\Users\\Admin\\Desktop\\RNTest"]
at DependencyGraph.getAbsolutePath (c:\Users\Admin\Desktop\RNTest\node_modules\metro\src\node-haste\DependencyGraph.js:317:11)
at c:\Users\Admin\Desktop\RNTest\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:280:416
at Generator.next (<anonymous>)
at step (c:\Users\Admin\Desktop\RNTest\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:11:445)
at c:\Users\Admin\Desktop\RNTest\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:11:605
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
BUNDLE [android, dev] ./index.js โโโโโโโโโโโโโโโโ 0.0% (0/1), failed.
Thanks very much. Let me know if there's any other details that might help.
@allforabit
Could you please run react-native run-android and paste packager outputs here?
And outputs of react-native -v
Here you go @iTOYS ...
Initial screen:
C:\Users\Admin\Desktop\RNTest>react-native run-android
Scanning folders for symlinks in C:\Users\Admin\Desktop\RNTest\node_modules (20ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0554Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:installDebug
Installing APK 'app-debug.apk' on 'Nexus_4_API_22(AVD) - 5.1.1' for app:debug
Installed on 1 device.
BUILD SUCCESSFUL
Total time: 8.416 secs
Running E:\Android\sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081
Starting the app on emulator-5554 (E:\Android\sdk/platform-tools/adb -s emulator-5554 shell am start -n com.rntest/com.rntest.MainActivity)...
Starting: Intent { cmp=com.rntest/.MainActivity }
Metro bundler popup window:
Scanning folders for symlinks in C:\Users\Admin\Desktop\RNTest\node_modules (30ms)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ 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\Admin\Desktop\RNTest
Metro Bundler ready.
Loading dependency graph, done.
BUNDLE [android, dev] ./index.js โโโโโโโโโโโโโโโโ 100.0% (481/481), done.
All clues say that it's issue with watchman's cache, could you please try to reset it in vscode terminal?
Thanks for all the help. Unfortunately I'm still experiencing the issue.
Just to confirm. I cleared the watchman cache by running this command in the project root:
C:\Users\Admin\Desktop\RNTest>watchman watch-del-all
{
"version": "4.9.1",
"roots": [
"C:/Users/Admin/Desktop/RNTest"
]
}
It does seem to get a bit further along but gives me the following error in the debug output:
OS: win32 x64
Adapter node: v7.9.0 x64
vscode-chrome-debug-core: 3.17.3
Starting debugger app worker.
Established a connection with the Proxy (Packager) to the React Native application
Debugger worker loaded runtime on port 12436
Couldn't import script at <http://localhost:8081/index.bundle?platform=android&dev=true&minify=false>. Debugging won't work: Try reloading the JS from inside the app, or Reconnect the VS Code debugger: {"message":"Cannot find entry file index.js in any of the roots: [\"c:\\\\Users\\\\Admin\\\\Desktop\\\\RNTest\"]","name":"NotFoundError","type":"NotFoundError","status":404,"errors":[{"description":"Cannot find entry file index.js in any of the roots: [\"c:\\\\Users\\\\Admin\\\\Desktop\\\\RNTest\"]"}],"stack":"NotFoundError: Cannot find entry file index.js in any of the roots: [\"c:\\\\Users\\\\Admin\\\\Desktop\\\\RNTest\"]\n at DependencyGraph.getAbsolutePath (c:\\Users\\Admin\\Desktop\\RNTest\\node_modules\\metro\\src\\node-haste\\DependencyGraph.js:317:11)\n at c:\\Users\\Admin\\Desktop\\RNTest\\node_modules\\metro\\src\\DeltaBundler\\DeltaCalculator.js:280:416\n at Generator.next (<anonymous>)\n at step (c:\\Users\\Admin\\Desktop\\RNTest\\node_modules\\metro\\src\\DeltaBundler\\DeltaCalculator.js:11:445)\n at c:\\Users\\Admin\\Desktop\\RNTest\\node_modules\\metro\\src\\DeltaBundler\\DeltaCalculator.js:11:605\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:188:7)"}
And the following error in React Native output:
[Info] Starting Packager
Scanning folders for symlinks in c:\Users\Admin\Desktop\RNTest\node_modules (23ms)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ 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\Admin\Desktop\RNTest
Metro Bundler ready.
[Info] Packager started.
[Info] Prewarming bundle cache. This may take a while ...
[Info] Entry point at c:\Users\Admin\Desktop\RNTest\index.android.js doesn't exist. Skipping prewarming...
[Info] Building and running application.
Loading dependency graph, done.
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Desktop\RNTest"
[Info] Enable JS Debugging
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Desktop\RNTest"
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Desktop\RNTest"
Starting custom debugger by executing: echo A debugger is not needed: "c:\Users\Admin\Desktop\RNTest"
error: bundling failed: NotFoundError: Cannot find entry file index.js in any of the roots: ["c:\\Users\\Admin\\Desktop\\RNTest"]
at DependencyGraph.getAbsolutePath (c:\Users\Admin\Desktop\RNTest\node_modules\metro\src\node-haste\DependencyGraph.js:317:11)
at c:\Users\Admin\Desktop\RNTest\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:280:416
at Generator.next (<anonymous>)
at step (c:\Users\Admin\Desktop\RNTest\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:11:445)
at c:\Users\Admin\Desktop\RNTest\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:11:605
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
BUNDLE [android, dev] ./index.js โโโโโโโโโโโโโโโโ 0.0% (0/1), failed.
Could you please try to debug?
Please add following string to your src/common/commandExecutor.js file:
this.logger.error(JSON.stringify(spawnOptions.env, null, 2));
How to find extension files please see here
Also please check, which env vars you have in your command line:
$ node
> process.env
PATH vars should be equal
Experiencing the same issue
Thanks @iTOYS I will try to do this today but if not over the weekend.
I have it building successfully now. However I'm not sure where in that file I should add that line of code (this.logger.error(JSON.stringify(spawnOptions.env, null, 2));). Thanks @iTOYS
@allforabit
Glad to hear that!
You should be add logging on line 154, my fault, sorry.
Could you please share how did you fix this issue?
Thanks!
Ok thanks @iTOYS I'll add that to that line. Sorry I meant I had got the vscode-react-native plugin built and working. I still haven't got it actually working.
@allforabit
Any info from logs would be helpful!
My main idea is that vscode and cmd uses different environment variables and/or different nodejs versions.
Do you use nvm or something else for managing nodejs versions?
Unfortunately I still can't repro this.
Yes I'm using nvm for windows so that could be the root of the problems. I'll get back to you with this info asap.
Hi @allforabit I noticed that you have several errors in Developer Tools console output that caused by other extensions. Could you please try to uninstall those extensions for a while and try to debug your app again?
@allforabit
Any updates?
Sorry I've had a very busy week and haven't had a chance yet. It really sounds like it's an issue with my setup though. Feel free to close for now. Hope to have another look over the weekend.
I'm having this same issue and I'm not sure why this got closed. Running react-native run-android and then attaching the vscode debugger works fine. It is a valid workaround but quite annoying.
Most helpful comment
Experiencing the same issue