nuxt / vercel-builder

Vercel Builder for Nuxt
MIT License
644 stars 76 forks source link

500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED #810

Closed studentofcoding closed 1 year ago

studentofcoding commented 1 year ago

Hi,

I am facing a 500 error "FUNCTION_INVOKATION_FAILED" on a Nuxt 3.6.3 project.

This is related to https://github.com/nuxt/vercel-builder/issues/806, but in our cases, this error only happens on our /blog/** routes.

This is the example of the link: https://evercam.sg/blog/a-very-merry-christmas-and-a-happy-new-year-from-all-at-evercam

Screenshot 2023-07-19 at 12 23 03

These are the log

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/unstorage/drivers/fs.mjs' imported from /var/task/index.mjs
    at new NodeError (node:internal/errors:399:5)
    at finalizeResolution (node:internal/modules/esm/resolve:331:11)
    at moduleResolve (node:internal/modules/esm/resolve:994:10)
    at moduleResolveWithNodePath (node:internal/modules/esm/resolve:938:12)
    at defaultResolve (node:internal/modules/esm/resolve:1202:79)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
    at link (node:internal/modules/esm/module_job:76:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}
RequestId: fdd7365d-e759-4dbb-bd02-09e9703d44e1 Error: Runtime exited with error: exit status 1
Runtime.ExitError

Additional context: The weird thing was this error only happens if we want to access the url directly or open the new tab. But if we go to https://evercam.sg/blog and open one blog by clicking Read More, it works fine. 😅

Can someone help? thanks

danielroe commented 1 year ago

You should not be using this builder for a Nuxt 3 project.

If you are not using the builder, then I would suggest refreshing your lockfile.

(Feel free to open an issue on https://github.com/nuxt/nuxt.)