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

Issue deploying in Cloudflare Pages with SSR enabled (Error: Failed to publish your Function. Got error: Unknown internal error occurred) #28304

Closed
ltroya-as opened this issue Jul 24, 2024 · 3 comments

Comments

@ltroya-as
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v21.7.1
  • Nuxt Version: 3.12.1
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.6
  • Package Manager: yarn@1.22.22
  • Builder: -
  • User Config: app, typescript, devServerHandlers, vite, runtimeConfig, sourcemap, modules, build, css, tailwindcss, ignore, plugins, graphql, sitemap, robots, experimental
  • Runtime Modules: @nuxtjs/tailwindcss@6.12.0, nuxt-graphql-request@8.0.2, @nuxtjs/sitemap@5.2.0, @nuxtjs/robots@3.0.0, @nuxt/test-utils/module@3.13.1
  • Build Modules: -

Reproduction

N/A

Describe the bug

Hi guys, after fixing the first issue running my app locally I need to deploy my changes to Cloudflare Pages.

First, I don't know if this is the right place to ask this question, if not, please let me know where I should ask.

Everything appears to be fine until the end of the deployment where I see the following: Error: Failed to publish your Function. Got error: Unknown internal error occurred..

This project contains no custom functions.

What has worked for me so far:

  • Running locally nuxi build && nuxi preview
  • Deploying my app to Vercel
  • Deploying my app to AWS Amplify

What has not worked for me so far:

  • nuxi preview --preset=cloudflare-pages && npx wrangler pages dev dist/. Here is the log of what I see:
✘ [ERROR] [nuxt] [request error] [unhandled] [500] s55 is not a function

at null.<anonymous>
    (file:./.wrangler/tmp/pages-sG8Vax/chunks/build/server.mjs:1:388642)
    at .wrangler/tmp/pages-sG8Vax/chunks/build/server.mjs
    (file:./.wrangler/tmp/pages-sG8Vax/chunks/build/server.mjs:1:388680)
    at __init
    (file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:12:59)
    at null.<anonymous>
        (file:./.wrangler/tmp/pages-sG8Vax/chunks/routes/renderer.mjs:1:128648)
        at null.<anonymous> (async
            file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:178324:20)
            at async Kr4
            (file:./.wrangler/tmp/pages-sG8Vax/chunks/routes/renderer.mjs:1:130385)
            at async Object.handler
            (file:./.wrangler/tmp/pages-sG8Vax/chunks/routes/renderer.mjs:1:132890)
            at async Object.handler
            (file:./.wrangler/tmp/pages-sG8Vax/chunks/runtime.mjs:1:73437)
            at null.<anonymous> (async
                file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:179955:7)
                at null.<anonymous> (async
                    file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:183529:26)


                    [wrangler:inf] GET / 500 Internal Server Error (102ms)
                    ✘ [ERROR] [nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'default')

                    at null.<anonymous>
                        (file:./.wrangler/tmp/pages-sG8Vax/chunks/routes/renderer.mjs:1:128722)
                        at null.<anonymous> (async
                            file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:178324:20)
                            at async Kr4
                            (file:./.wrangler/tmp/pages-sG8Vax/chunks/routes/renderer.mjs:1:130385)
                            at async Object.handler
                            (file:./.wrangler/tmp/pages-sG8Vax/chunks/routes/renderer.mjs:1:132890)
                            at async Object.handler
                            (file:./.wrangler/tmp/pages-sG8Vax/chunks/runtime.mjs:1:73437)
                            at null.<anonymous> (async
                                file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:179955:7)
                                at null.<anonymous> (async
                                    file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:183529:26)
                                    at async errorHandler
                                    (file:./.wrangler/tmp/pages-sG8Vax/chunks/runtime.mjs:1:139411)
                                    at null.<anonymous> (async
                                        file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:179958:76)
                                        at null.<anonymous> (async
                                            file:./.wrangler/tmp/dev-oHzJAU/qfbkky8988l.js:183529:26)
  • Deploying my changes on Cloudflare pages. Here are the latest logs I see when deploying my app:
17:31:00.263 | ✨ Compiled Worker successfully
-- | --
17:31:01.065 | Found _routes.json in output directory. Uploading.
17:31:01.084 | Validating asset output directory
17:31:03.597 | Deploying your site to Cloudflare's global network...
17:31:06.716 | Parsed 354 valid redirect rules.
17:31:06.716 | Parsed 3 valid header rules.
17:31:08.451 | Uploading... (964/967)
17:31:08.877 | Uploading... (965/967)
17:31:08.991 | Uploading... (966/967)
17:31:09.080 | Uploading... (967/967)
17:31:09.080 | ✨ Success! Uploaded 3 files (964 already uploaded) (1.48 sec)
17:31:09.080 |  
17:31:09.885 | ✨ Upload complete!
17:31:13.556 | Success: Assets published!
17:31:19.010 | Error: Failed to publish your Function. Got error: Unknown internal error occurred.
17:31:19.010 | Note: Not all logs could be displayed, click "Download log" to view more

I have created a Cloudflare ticket to get more information about that Unknown internal error, however, I haven't received a response in more than a week.

Is there anything I can do in the meantime to see more information about the error? Any hint would be appreciated!

Kind regards,
Luis.

Additional context

No response

Logs

No response

Copy link
Contributor

Would you be able to provide a reproduction? 🙏

More info

Why do I need to provide a reproduction?

Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.

What will happen?

If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.

If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.

How can I create a reproduction?

We have a couple of templates for starting with a minimal reproduction:

👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz
👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox

A public GitHub repository is also perfect. 👌

Please ensure that the reproduction is as minimal as possible. See more details in our guide.

You might also find these other articles interesting and/or helpful:

Copy link
Contributor

github-actions bot commented Aug 1, 2024

This issue was closed because it was open for 7 days without a reproduction.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2024
@ltroya-as
Copy link
Author

If anyone gets this problem, I remove all the dependencies on the project and add them one by one. That solved my issue

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

No branches or pull requests

2 participants