I tried to run angular app in production mode ng serve --aot --prod. When the app is launched, I see an error in console, but the error stack trace is obfuscated and I cannot find the source code which causes the error. Without --prod option, there are no errors. How I can find the error source?
main.026c3ce7721e9ba03a1e.js:1 ERROR TypeError: f.ngOnInit is not a function
at main.026c3ce7721e9ba03a1e.js:1
at main.026c3ce7721e9ba03a1e.js:1
at Ji (main.026c3ce7721e9ba03a1e.js:1)
at Eo (main.026c3ce7721e9ba03a1e.js:1)
at Object.updateDirectives (main.026c3ce7721e9ba03a1e.js:1)
at Object.updateDirectives (main.026c3ce7721e9ba03a1e.js:1)
at $i (main.026c3ce7721e9ba03a1e.js:1)
at so (main.026c3ce7721e9ba03a1e.js:1)
at oo (main.026c3ce7721e9ba03a1e.js:1)
at $i (main.026c3ce7721e9ba03a1e.js:1)
Enable sourceMap in anuglar.json config file to see original code stack trace.
{
"projects": {
"myProject": {
"architect": {
"build": {
"configurations": {
"production": {
"sourceMap": true
}
}
}
}
}
}
}
I also tried to add --source-map option to serve command, but the option didn't solve my problem for some reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With