error: `Cannot read properties of undefined (reading 'component')`

i am working vue.js3 + laravel8

I'm trying to register my reused my-button component as a global component

vue.js3 + lorevel8

**my app.js**

```
window.Vue = require('vue').default;
import { createApp } from 'vue';
import router from "./router";
import components from './components/UI'

components.forEach(component => {
    app.component(component.name, component)
})

const app = createApp({})
app.use(router)
   .mount("#app")

```

**my Index.js**

```
import MyButton from "./MyButton";

export default  [
    MyButton
]

```

**my button.vue**

```
<template>
    <button class="btn">
        <slot></slot>
    </button>
</template>

<script>
export default {
    name: "my-button"
}
</script>

<style scoped lang="scss">

.btn {
    background-color: var(--color-primary-light);
    color: #fff;
    border: none;
    border-radius: 0;
    font-family:'Josefin Sans', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    padding: 1.8rem 3rem;
    cursor: pointer;
    transition: all .2s;

&:hover {
     background-color: var( --color-primary-dark);
 }
}

</style>

```

error: Cannot read properties of undefined (reading 'component')

Can anybody help me plsss ?

*can't figure it out properties of undefined*