Could not get it working with Create-React-App
See original GitHub issueThis is somehow-of-a-bug-report.
FWIW, I could not get it debugging working it working with CRE (https://github.com/facebookincubator/create-react-app) and Nightly.
OTOH, it works out of the box with the VSCode Chrome debugger.
While this might not be a bug of this VSCode extension I think CRE might be good use case that should work out of the box with the debugger. (Because CRE is very strictly defined in scope, has a fixed configuration and is very popular)
Any idea why it does not?
Here’s my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "firefox",
"request": "launch",
"reAttach": true,
"name": "Launch Firefox localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}",
"firefoxExecutable": "C:/Program Files/Nightly/firefox.exe",
"log": {
"consoleLevel": {
"PathConversion": "Debug",
"default": "Error"
}
}
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}"
}
]
}
FWIW, in the log I see
INFO |005.672|PathConversion: Can't convert url C:/Users/jnachtigall/Devel/xxxmeinprojekt/src/App.js to path
INFO |005.672|PathConversion: Can't convert url C:/Users/jnachtigall/Devel/xxxmeinprojekt/src/components/Character.js to path
which seems to be the problem, but I have now idea why it does not work (whereas it does with Chrome).
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Create React App not working - Stack Overflow
1. update the npm version (npm install npm@latest -g) · 2. clear the cache (npm cache clean --force) · 3. create the react...
Read more >npx create-react-app is not working · Issue #10132 - GitHub
I am able to solve the problem by first trying to uninstall the npm globally, update the npm, clear the cache then using...
Read more >npx create-react-app not working? Here's the solution.
The current solution is simple — run create-react-app and target the latest version. Run creact-react-app using the latest version. npx create- ...
Read more >create-react-app: command not found (React) error [Solved]
Use `npx` to solve the error create-react-app: command not found, e.g. `npx create-react-app my-app` or install the package globally by running `npm install ......
Read more >Create React App without Create React App - Bits and Pieces
This article will help us to understand. How webpack and babel work in a more practical sense;; The actual starting to ending flow...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is actually a bug in Firefox, you can work around it by telling the debug adapter to handle the sourcemaps itself instead of letting Firefox’ debugger backend handle them. Just add
"sourceMaps": "client"
to yourlaunch.json
and it should work (even without your pathMappings).Some background info in case you’re interested: Firefox is moving the handling of sourcemaps from the debugger backend (the server side of the debug protocol) to the new debugger frontend (the client side of the debug protocol). I guess that since the new debugger frontend is now the default, the server-side handling of sourcemaps will soon be removed. I will probably also make
"sourceMaps": "client"
the new default in the next release.I’m experiencing the same thing with create-react-app (CRA). It appears as though Firefox (Quantum Developer Edition v.57) looks for the entire URL including localpath.
Here is my
launch.json
which I modified to make it work (Chrome included which is working):In the logs, you’ll see lines like:
Converted url http://localhost:3000/Users/jhankins/dev/lemming/tundra/src/store/configureStore.js to path /Users/jhankins/dev/lemming/tundra/src/Users/jhankins/dev/lemming/tundra/src/store/configureStore.js
unless you specify the full pathMapping URL to include the local filesystem. Firefox doesn’t actually request that URL, rather it is requesting http://localhost:3000/
So is this related, a separate issue, or am I just misunderstanding the configuration?