[Vue warn]: Error in render: "ReferenceError: moment is not defined" code example
Example: 'moment' is not defined export default vue
<template>
<div>
<p>{{ formattedDate }}</p>
</div>
</template>
<script>
import moment from 'moment';
export default {
computed: {
formattedDate() {
return moment(this.givenDate).format('YYYY');
}
},
//
}
</script>