ionic-team/ionic-vue-conference-app

Error when running app

zhiyong-ft opened this issue · 3 comments

When I tried to run the following command:

npm run serve

I get the following error:

ERROR in D:/Mobile/ionic/ionic-vue-conference-app-master/src/views/About.vue
61:18 Parameter 'event' implicitly has an 'any' type.
59 | export default class About extends Vue {
60 |

61 | presentPopover(event){
| ^
62 | console.log('click', event)
63 | }
64 | }
Version: typescript 3.0.1
Time: 17848ms

I am running this on Windows 10, with NPM version 6.9.0, vue: 3.8.2, ionic: 4.12.0

I can still access the app from localhost, so the app should still work mostly.

Add following in tsconfig.json

"noImplicitAny": false

The tsconfig.json has already a strict property set to true and the doc's say:

Enable all strict type checking options. Enabling --strict enables --noImplicitAny, --noImplicitThis, --alwaysStrict, --strictBindCallApply, --strictNullChecks, --strictFunctionTypes and --strictPropertyInitialization.

See: https://www.typescriptlang.org/docs/handbook/compiler-options.html

Then it's better to just change strict to false

And then $npm run build

export default class About extends Vue {
presentPopover(event:Event){
//console.log('click', event)
}
}