Note
Before debugging the npm source code, you may want to try to run the npm command with verbose level log, the log may provide some details for you to solve the issue instead of debugging the code. To enable to verbose level log, run the npm command with below command
npm mycommand --loglevel verbose
When using third party npm package in your js app, sometimes you will need to debug the js code to figure out issues.
Quite often, the third party npm package js code is minified, so as to load them faster. But during debug, you will want to load the no-minified js file. An easy way to do so is open the third party package.json file, and update main element's value to point to the debug version js entry point.
For example, to debug oidc-client.js, in package.json, make the below change
},
No comments:
Post a Comment