I’m trying to configure my ionic project in order to monitoring the errors like explained in this page :
When I run this command : ionic monitoring syncmaps, the result is an error of compilation because of the object IonicPro.
Any help for this ?
I’m trying to configure my ionic project in order to monitoring the errors like explained in this page :
When I run this command : ionic monitoring syncmaps, the result is an error of compilation because of the object IonicPro.
Any help for this ?
ionic monitoring syncmaps
git rev-parse HEAD
Running command - done!
? Do build before syncing? Yes
? Do full prod build? Yes
Running app-scripts build: --prod
[16:47:39] build prod started …
[16:47:39] clean started …
[16:47:39] clean finished in 2 ms
[16:47:39] copy started …
[16:47:39] deeplinks started …
[16:47:39] deeplinks finished in 62 ms
[16:47:39] ngc started …
[16:47:44] typescript: src/app/app.module.ts, line: 40
Cannot find name ‘IonicPro’.L39: handleError(err: any): void { L40: IonicPro.monitoring.handleNewError(err); L41: // Remove this if you want to disable Ionic's auto exception handling
Error: The Angular AoT build failed. See the issues above
at /home/ubuntu/workspace/project/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:232:55
at step (/home/ubuntu/workspace/project/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/home/ubuntu/workspace/project/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/home/ubuntu/workspace/project/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[16:47:44] copy finished in 5.39 s
Ok I found the error.
In the code given by the documentation https://ionicframework.com/docs/pro/basics/getting-started/#pro-client-setup, they use the following line code
Pro.init('YOUR_APP_ID', {
appVersion: 'APP_VERSION'
})
I replace this line by :
const IonicPro = Pro.init('YOUR_APP_ID', {
appVersion: 'APP_VERSION'
})
And then I have my IonicPro object.
Or replace your references to IonicPro with Pro?
I had other problems with this approach