Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working in local but failed when deployed to vercel #31

Closed
supermario12342003 opened this issue Nov 18, 2023 · 2 comments
Closed

Working in local but failed when deployed to vercel #31

supermario12342003 opened this issue Nov 18, 2023 · 2 comments

Comments

@supermario12342003
Copy link

supermario12342003 commented Nov 18, 2023

I tried this plugin using the following config

visualEditor({
      previewUrl: ({ locale }: PreviewUrlParams) => {
        return `${process.env.NEXT_PUBLIC_SERVER_URL}/${locale}/preview/pages`
      },
      collections: {
        pages: {
          previewUrl: ({ locale }: PreviewUrlParams) => {
            return `${process.env.NEXT_PUBLIC_SERVER_URL}/${locale}/preview/pages`
          },
        },
      },
    })

it's working in local, but it does not work in vercel. I got this error when it's trying to access api/me
Screenshot 2023-11-17 at 22 01 37

the error disappears when i remove the plugin. Is it because this plugin does not support serverless environment?

@jpeiniger
Copy link
Contributor

The error is unfortunately not very informative. Are you able to pin it down to a more concrete error related to any of the plugin code?

@supermario12342003
Copy link
Author

for now i only know that this plugin works perfectly in a non edge runtime. i deploy it in render.com and heroku, they both work perfectly, but it can't run at cloudflare page nor vercel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants