ERROR in deploying my Astro/react firebase authentic and firestore project

Hi, I get this error message on the displayed web:

This Serverless Function has crashed.

Your connection is working correctly.

Vercel is working correctly.

500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED
ID: gru1:gru1::pss7k-1729197634300-de74552208a2

I looked for information and I was suggested to see the logs.

  • this appears in the logs: Oct 17 15:40:38.06 GET — test-pfgruv9ar-marco-silveras-projects.vercel.app / Error [ERR_MODULE_NOT_FOUND]: Cannot find package ‘react’ imported from /var/task/.vercel/output/_functions/renderers.mjs at packageResolve (node:internal/modules/esm/resolve:8 58:9) at moduleResolve (node:internal/modules/esm/resolve:931:18) at moduleResolveWithNodePath (node:internal/modules/esm/resolve:1173:14) at defaultResolve (node:internal/modules/esm/resolve:1216:79) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38) at ModuleWrap. (node:internal/modules/esm/module_job:96 :40) at link (node:internal/modules/esm/module_job:95:36) { code: ‘ERR_MODULE_NOT_FOUND’ } Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
    Oct 17 15:40:37.76 GET 500 test-pfgruv9ar-marco-silveras-projects.vercel.app / [GET] / status=500 Oct 17 15:40:35.20 GET — test-pfgruv9ar-marco-silveras-projects.vercel.app / Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'react ’ imported from /var/task/.vercel/output/_functions/renderers.mjs at packageResolve (node:internal/modules/esm/resolve:858:9) at moduleResolve (node:internal/modules/esm/resolve:931:18) at moduleResolveWithNodePath (node:internal/modules/esm/resolve:1173:14) at defaultResolve (node:internal/modules/esm/resolve:1216:79) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25) at Module Loader.getModuleJob (node:internal/modules/esm/loader:239:38) at ModuleWrap. (node:internal/modules/esm/module_job:96:40) at link (node:internal/modules/esm/module_job:95:36) { code: ‘ERR_MODULE_NOT_FOUND’ } Node.js process exited with exit status: 1. The logs above can help with debugging the issue. Error [ERR_MODULE_NOT_FOUND]: Cannot find package ‘react’ imported from /var/task/.vercel/output/_functions/renderers.mjs at packageResolve (node:internal/modules/esm/resolve:858:9) at moduleResolve (node:internal/modules/esm/resolve:931:18) at moduleResolveWithNodePath (node:internal/modules/esm/resolve:1173:14) at defaultResolve (node:internal/modules/esm/resolve:1216:79) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38) at ModuleWrap. (node:internal/modules/esm/module_job:96:40) at link (node:internal/modules/esm/module_job:95:36) { code: ‘ERR_MODULE_NOT_FOUND’ } Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
    Oct 17 15:40:34.36
    GET
    500
    test-pfgruv9ar-marco-silveras-projects.vercel.app
    /
    [GET] / status=500

  • but in my package.json file there is already react and react-dom as dependencies:

“react”: “^18.3.1”,
“react-dom”: “^18.3.1”,

I don’t understand what the error would be, I would really appreciate it if you could help me please

Hi, @marco-silvera! Welcome to the Vercel Community :smile:

We have some troubleshooting steps in our docs, could you take a look and let us know how you get on?

Hi, I’ve already seen it, but in the error logs I get: Error [ERR_MODULE_NOT_FOUND]: Cannot find package ‘react’ imported from /var/task/.vercel/output/_functions/renderers.mjs

And yes, it is correctly imported. The truth is that this has never happened to me before. I always made my repository, my code, and with a simple deploy everything was ready.
Now that I’m making a project like a ““store”” without a shopping cart, using Firebase authentication and firestore to display the products, I get this error :frowning:

I copied my entire project to another repository and deployed again and now I get this:

This Serverless Function has timed out.

Your connection is working correctly.

Vercel is working correctly.

504: GATEWAY_TIMEOUT
Code: FUNCTION_INVOCATION_TIMEOUT
ID: gru1:gru1::26zsg-1729313083818-b7fca08be5ba

And in LOGS: [GET] / status=504

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.