Error - An unknown error has occurred

PLEASE help us help you by writing a good post!

Unfortunately you haven’t done what is suggested.

If this is occurring during build, you will need to provide the build log so others can attempt to assist you debugging.

Put the log in a code block like this

sorry, my bad:

4:18:49 PM: ────────────────────────────────────────────────────────────────
4:18:49 PM: ​
4:18:49 PM: ❯ Version
4:18:49 PM:   @netlify/build 29.37.2
4:18:49 PM: ​
4:18:49 PM: ❯ Flags
4:18:49 PM:   baseRelDir: true
4:18:49 PM:   buildId: 66097068b8ba710008ad1b93
4:18:49 PM:   deployId: 66097068b8ba710008ad1b95
4:18:49 PM: ​
4:18:49 PM: ❯ Current directory
4:18:49 PM:   /opt/build/repo
4:18:49 PM: ​
4:18:49 PM: ❯ Config file
4:18:49 PM:   No config file was defined: using default values.
4:18:49 PM: ​
4:18:49 PM: ❯ Context
4:18:49 PM:   production
4:18:49 PM: ​
4:18:49 PM: Build command from Netlify app                                
4:18:49 PM: ────────────────────────────────────────────────────────────────
4:18:49 PM: ​
4:18:49 PM: $ npm run build
4:18:50 PM: > working-directory@0.0.1 build
4:18:50 PM: > astro check && astro build
4:18:52 PM: 14:18:52 Types generated 54ms
4:18:52 PM: 14:18:52 [check] Getting diagnostics for Astro files in /opt/build/repo...
4:18:55 PM: Result (8 files): 
4:18:55 PM: - 0 errors
4:18:55 PM: - 0 warnings
4:18:55 PM: - 0 hints
4:18:55 PM: 
4:18:56 PM: 14:18:56 [WARN] [config] The feature "assets" is experimental and subject to change (used by @astrojs/netlify).
4:18:56 PM: 14:18:56 [build] output: "server"
4:18:56 PM: 14:18:56 [build] directory: /opt/build/repo/dist/
4:18:56 PM: 14:18:56 [build] adapter: @astrojs/netlify
4:18:56 PM: 14:18:56 [build] Collecting build info...
4:18:56 PM: 14:18:56 [build] ✓ Completed in 140ms.
4:18:56 PM: 14:18:56 [build] Building server entrypoints...
4:18:57 PM: 14:18:57 [vite] ✓ built in 1.07s
4:18:57 PM: 14:18:57 [build] ✓ Completed in 1.10s.
4:18:57 PM:  building client (vite) 
4:18:57 PM: 14:18:57 [vite] transforming...
4:18:57 PM: 14:18:57 [vite] ✓ 6 modules transformed.
4:18:57 PM: 14:18:57 [WARN] [vite] [plugin:vite:reporter] [plugin vite:reporter]
4:18:57 PM: (!) /opt/build/repo/node_modules/auth-astro/client.ts is dynamically imported by /opt/build/repo/src/components/Header.astro?astro&type=script&index=0&lang.ts but also statically imported by /opt/build/repo/node_modules/auth-astro/src/components/SignIn.astro?astro&type=script&index=0&lang.ts, /opt/build/repo/node_modules/auth-astro/src/components/SignOut.astro?astro&type=script&index=0&lang.ts, dynamic import will not move module into another chunk.
4:18:57 PM: 
4:18:57 PM: 14:18:57 [vite] rendering chunks...
4:18:57 PM: 14:18:57 [vite] ✓ built in 27ms
4:18:57 PM: 14:18:57
4:18:57 PM:  finalizing server assets 
4:18:57 PM: 14:18:57 [build] Rearranging server assets...
4:18:57 PM: 14:18:57 [@astrojs/netlify] Emitted _redirects
4:18:57 PM: 14:18:57 [@astrojs/netlify] Generated SSR Function
4:18:57 PM: 14:18:57 [build] Server built in 1.29s
4:18:57 PM: 14:18:57 [build] Complete!
4:18:57 PM: ​
4:18:57 PM: (build.command completed in 7.9s)
4:18:57 PM: ​
4:18:57 PM: Functions bundling                                            
4:18:57 PM: ────────────────────────────────────────────────────────────────
4:18:57 PM: ​
4:18:57 PM: Packaging Functions from .netlify/functions-internal directory:
4:18:57 PM:  - ssr/ssr.mjs
4:18:57 PM: ​
4:18:59 PM: ​
4:18:59 PM: (Functions bundling completed in 1.6s)
4:18:59 PM: ​
4:19:05 PM: (Netlify Build completed in 16s)
4:19:06 PM: Section completed: building
4:19:09 PM: Finished processing build request in 45.31s```

I see no errors in build.

The error is in the running of the site and the SSR function, isn’t it!?

This is important information that saves times.

Assisting with an Astro SSR issue is not something I can do. If you, however, provide the public git repository you are deploying from, another community member likely can provide you some assistance.

this is my repository: GitHub - cnrxad/nitda

Hi, @cnrxad. There are errors in your SSR function logs here:

https://app.netlify.com/sites/nitda/logs/functions/ssr

Have you tried debugging those errors? If so, what have you tried and what were the results?

hello, sorry for late reply. I don’t know how to debug these errors, could you help me?

I think the error is self-explanatory:

It points to the relevant docs: Read more at https://errors.authjs.dev#missingsecret