Description
In angular9, I am getting the following error after installing StackTrace-Gps as a separate package to get unminifed location.
Uncaught Error: define cannot be used indirect
at push../node_modules/webpack/buildin/amd-define.js.module.exports (amd-define.js:2)
at Object. (source-map-generator.js:8)
at Object../node_modules/source-map/lib/source-map/source-map-generator.js (source-map-generator.js:399)
at webpack_require (bootstrap:79)
at Object../node_modules/source-map/lib/source-map.js (source-map.js:6)
at webpack_require (bootstrap:79)
at stacktrace-gps.js:7
at Object../node_modules/stacktrace-gps/stacktrace-gps.js (stacktrace-gps.js:13)
at webpack_require (bootstrap:79)
at stacktrace.js:7
code :
var gps = new StackTraceGPS();
// Pinpoint actual function name and source-mapped location
gps.findFunctionName(stackframes[0]).then((gpsStackFrame) => {
console.log(gpsStackFrame);
});
Here is how I am importing
import * as StackTrace from "stacktrace-js";
import * as StackTraceGPS from "stacktrace-gps";