How to debug errors in custom plugin or how to enable source mapping for typescript

I have created some custom plugins for my nocobase application. Now its working fine in development mode. When I am building the application it is not showing any error. But after yarn start is shows the errors:

TypeError: Cannot convert undefined or null to object
at Function.keys ()
at Object. (p__index.a25f7d7a.async.js:9:20975)
at Object.execCb (p__index.a25f7d7a.async.js:53:12083)
at e.check (p__index.a25f7d7a.async.js:53:5283)
at e. (p__index.a25f7d7a.async.js:53:7696)
at p__index.a25f7d7a.async.js:52:12031
at p__index.a25f7d7a.async.js:53:8158
at each (p__index.a25f7d7a.async.js:52:11326)
at e.emit (p__index.a25f7d7a.async.js:53:8126)
at e.check (p__index.a25f7d7a.async.js:53:5880) {code: ‘LOAD_ERROR’, message: ‘Cannot convert undefined or null to object’}

Now the issue is the errors point to the build file and does not provide source map to debug the code. How to understand or enable source map so that I can find where the issue is in the actual code and not the build file?

Due to limited information, I suggest analyzing the source code and debugging. If convenient, please provide a minimal reproducible demo.

I had able to fix the issue by commenting each methods and building the app. Using a trial and error approach to find the issue