TypeError Next.js GetStaticProps

I have the following error in my Next.js project

error - pagespost[slug].js (30:38) @ getStaticProps
TypeError: (0 , _services__WEBPACK_IMPORTED_MODULE_2__.getPostDetails) is not a function

Can anyone help me to solve this?

export async function getStaticProps({ params }) {
    const data = await getPostDetails(params.slug);
    return {
        props: {
            post: data,
        },
    };
}

export async function getStaticPaths() {
    const posts = await getPosts();
    return {
        paths: posts.map(({ node: { slug } }) => ({ params: { slug } })),
        fallback: false,
    };
}