'How to use class style components in nuxt.js?

I setup a nuxt3 project. and I want to use class style components but when I am installing vue-property-decorator, I am getting below error. Can anyone have idea how to solve this and how can we use class based components in nuxt3.

enter image description here



Solution 1:[1]

This looks like a typical issue with legacy peer dependencies. You can circumvent that issue by passing --legacy-peer-deps to your npm command, e.g.:

npm i vue-property-decorator --legacy-peer-deps

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Moritur