question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid file path reference in stack trace on NODE app with nx serve

See original GitHub issue

Current Behavior

Stack trace errors (NODE APP, nx serve) are referencing incorrect files

Expected Behavior

Stack trace should reference the right path to allow VS CODE to open the file on click.

Steps to Reproduce

On a NODE project, run the app and throw somewhere, you will get a stack trace printed in the console. The paths for ts files are mapped incorrectly due to webpack mapping errors.

Error: 123
    at ServerInitializationModule.configure (/Users/shlomiassaf/Desktop/Code/sg/sg-node/dist/applications/public-api/webpack:/applications/public-api/src/app/server/init/init.module.ts:44:11)
    at MiddlewareModule.loadConfiguration (/Users/shlomiassaf/Desktop/Code/sg/sg-node/node_modules/@nestjs/core/middleware/middleware-module.js:47:24)
    at loadMiddlewareConfiguration (/Users/shlomiassaf/Desktop/Code/sg/sg-node/node_modules/@nestjs/core/middleware/middleware-module.js:37:24)
    at Array.map (<anonymous>)
...

Instead of /Users/shlomiassaf/Desktop/Code/sg/sg-node/dist/applications/public-api/webpack:/applications/public-api/src/app/server/init/init.module.ts

It should be /Users/shlomiassaf/Desktop/Code/sg/sg-node/applications/public-api/src/app/server/init/init.module.ts

It has an effect on the development process, very hard to jump into areas. Not the end of the world, but would be nice to have this sorted out.

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
hardikbeladiyacommented, Jan 18, 2022

Same here. I am working on the Project in which we don’t have the clue from where the Error is coming, so I guess this is very important Issue.

1reaction
elisiskindcommented, Nov 23, 2021

I agree this should be reopened - this is a serious problem and I am not aware of any workarounds.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to create nx workspace - node.js - Stack Overflow
I am facing the same issue for resolving use below command for creating new workspace:- npx create-nx-workspace --preset=angular ...
Read more >
nrwl-nx/community - Gitter
I moved our "components" folder, previously referenced as @components , into a library. I moved the contents of the folder into libs/components/src/lib, but ......
Read more >
4 Reasons Why Your Source Maps are Broken - Sentry Blog
Missing original source files​​ Parts of the transformation are clearly working; for example, error stack traces now mention your original ...
Read more >
Debugging with GDB - sourceware.org
This file describes GDB, the GNU symbolic debugger. ... Stack: Examining the stack ... or the remote server's working directory if remote debugging....
Read more >
A Complete Guide to Winston Logging in Node.js - Better Stack
In this tutorial, we will explain how to install, set up, and use the Winston logger in a Node.js application. We'll go through...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found