The basic demo doesn't work.
See original GitHub issueI’m following the basic demo here: https://github.com/evanw/node-source-map-support#basic-demo
npm install source-map-support
echo 'throw new Error("test"); // This is the original code' > original.js
echo 'require("source-map-support").install();
throw new Error("test"); // This is the compiled code
// The next line defines the sourceMapping.
//# sourceMappingURL=compiled.js.map' > compiled.js
echo '{
"version": 3,
"file": "compiled.js",
"sources": ["original.js"],
"names": [],
"mappings": ";;;AAAA,MAAM,IAAI"
}' > compiled.js.map
node compiled.js
And I get:
.../compiled.js:3
throw new Error(test); // This is the compiled code
^
Error: test
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Well the demo doesn't work : r/Steam
Open this new .reg file and it will ask if you want to apply the fix, say yes. Game should now work.
Read more >5 Ways to Fix Steam if The Download Demo Button is Not ...
If your Steam download demo button is not working, do not panic, hop on this article to find out the best troubleshooting fixes....
Read more >(BUG) Issues with unavailable demos blocking the ...
1. Find the demo's install link on Steam DB · 2. Start the install · 3. Stop the install · 4. Uninstall the...
Read more >What to Do When Your Demo Fails
What to Do When Your Demo Fails · Tip 1: If it's small, don't acknowledge it · Tip 2: Resist the urge to...
Read more >Your Product Demo Sucks Because It's Focused on Your ...
Good demos don't have to be perfect for the product. They have to be perfect for the audience. No matter who you're meeting...
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 Free
Top 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
Thanks team. I’ve got things working.
Part of the reason I thought this was broken and tried the demo is because I couldn’t get it to work in my own project.
The problem turned out to be this line from your README:
I was inserting this line at the top of an already compiled file (as the instructions said) and then expecting it to work. But my sourcemaps are generated by babel at the same time as compilation, so with an extra line added after the sourcemap had been generated, things got messed up.
The fix ended up being to insert this line in the original file before compilation, and then everything worked.
I’m happy to submit a PR request for the README, but could someone confirm that how I’m doing things is correct?
Oh there’s also #97