Open
Description
openedon Feb 2, 2024
Current Behavior
When I run nx serve my-project
it won't generate a sourcemap for my main.js file. Meaning I can't use a debugger in Typescript.
Expected Behavior
I expect it to create a sourceMap next to my main.js file
GitHub Repo
No response
Steps to Reproduce
- Create a a fresh nx workspace with a nest preset
npx create-nx-workspace my-workspace --preset=nest
- run it with
nx serve appname
- check
dist/apps/appname
, main.js does not have a sourcemap included.
Nx Report
> NX Report complete - copy this into the issue template
Node : 21.4.0
OS : darwin-x64
npm : 10.2.4
nx (global) : 17.2.8
nx : 17.3.1
@nx/js : 17.3.1
@nx/jest : 17.3.1
@nx/linter : 17.3.1
@nx/eslint : 17.3.1
@nx/workspace : 17.3.1
@nx/devkit : 17.3.1
@nx/eslint-plugin : 17.3.1
@nx/nest : 17.3.1
@nx/node : 17.3.1
@nrwl/tao : 17.3.1
@nx/web : 17.3.1
@nx/webpack : 17.3.1
typescript : 5.3.3
Failure Logs
No response
Package Manager Version
No response
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
Originally I had a repo with NX version 16.2 / the debugging experience was working fine.
I used NX migrate to migrate my repo to the latest NX version: 17.3. The debugger stopped working. After a lot of trial and error, I noticed that a sourceMap was not generated for the main.js file any more - hence the debugger could not match my Typescript breakpoints with the main.js file.
I thought that maybe my repo was messed up and generated a brand new one with the nx generate workspace command. That one had the same issue OOTB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment