Netlify does not support Astro's dynamic route?

I was just testing Astro and my build keeps failing when I tried having a directory

  • src
    – pages
    —products
    ---- [slug].astro

But when I deleted that dynamic route, the build succeded. Inside the [slug].astro file calls an api using fetch from outside source and outputs dynamic data.

Isn’t that supported?

EDIT: Can confirm. I think Netlify does not support dynamic routing for now. I tried swapping @astrojs/netlify to @astrojs/vercel and deploy it vercel and it works. Looking forward for Netlify to fix this soon. I’m aware edge functions has just launched :slight_smile:

Hey @reden

Can you link to a failing deploy log (or paste the contents here inside a code block) to ascertain what the error is.

(post deleted by author)

9:37:11 AM: ────────────────────────────────────────────────────────────────
9:37:11 AM:   2. Edge Functions bundling                                    
9:37:11 AM: ────────────────────────────────────────────────────────────────
9:37:11 AM: ​
9:37:11 AM: Packaging Edge Functions from .netlify/edge-functions directory:
9:37:11 AM:  - entry
9:37:14 AM: ​
9:37:14 AM: ────────────────────────────────────────────────────────────────
9:37:14 AM:   Internal error during "Edge Functions bundling"               
9:37:14 AM: ────────────────────────────────────────────────────────────────
9:37:14 AM: ​
9:37:14 AM:   Error message
9:37:14 AM:   Error: [
9:37:14 AM:     {
9:37:14 AM:       "instancePath": "/routes/2/pattern",
9:37:14 AM:       "schemaPath": "#/properties/routes/items/properties/pattern/errorMessage",
9:37:14 AM:       "keyword": "errorMessage",
9:37:14 AM:       "params": {
9:37:14 AM:         "errors": [
9:37:14 AM:           {
9:37:14 AM:             "instancePath": "/routes/2/pattern",
9:37:14 AM:             "schemaPath": "#/properties/routes/items/properties/pattern/format",
9:37:14 AM:             "keyword": "format",
9:37:14 AM:             "params": {
9:37:14 AM:               "format": "regexPattern"
9:37:14 AM:             },
9:37:14 AM:             "message": "must match format \"regexPattern\"",
9:37:14 AM:             "emUsed": true
9:37:14 AM:           }
9:37:14 AM:         ]
9:37:14 AM:       },
9:37:14 AM:       "message": "must match format /^\\^.*\\$$/"
9:37:14 AM:     }
9:37:14 AM:   ]
9:37:14 AM: ​
9:37:14 AM:   Error location
9:37:14 AM:   During Edge Functions bundling
9:37:14 AM:       at validateEdgeFunctionsManifest (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins_core/edge_functions/validate_manifest/validate_edge_functions_manifest.js:85:11)
9:37:14 AM:       at async coreStep (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins_core/edge_functions/index.js:70:3)
9:37:14 AM:       at async fireCoreStep (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/steps/core_step.js:40:9)
9:37:14 AM:       at async tFireStep (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/time/main.js:20:59)
9:37:14 AM:       at async runStep (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/steps/run_step.js:88:7)
9:37:14 AM:       at async pReduce.index (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/steps/run_steps.js:91:11)
9:37:14 AM:       at async Promise.all (index 0)
9:37:16 AM: Creating deploy upload records
9:37:14 AM:       at async next (file:///opt/buildhome/node-deps/node_modules/p-reduce/index.js:15:44)
9:37:14 AM: ​
9:37:14 AM:   Resolved config
9:37:14 AM:   build:
9:37:14 AM:     command: npm run build
9:37:16 AM: Failed during stage 'building site': Build script returned non-zero exit code: 4 (https://ntl.fyi/exit-code-4)
9:37:14 AM:     commandOrigin: ui
9:37:14 AM:     publish: /opt/build/repo/dist
9:37:14 AM:     publishOrigin: ui
9:37:14 AM:   redirects:
9:37:14 AM:     - from: /
9:37:14 AM:       status: 200
9:37:14 AM:       to: /.netlify/edge-functions/entry
9:37:14 AM:     - from: /stories
9:37:14 AM:       status: 200
9:37:14 AM:       to: /.netlify/edge-functions/entry
9:37:15 AM:     - from: /stories/*
      status: 200
      to: /.netlify/edge-functions/entry
Caching artifacts
9:37:15 AM: Started saving node modules
9:37:15 AM: Finished saving node modules
9:37:15 AM: Started saving build plugins
9:37:15 AM: Finished saving build plugins
9:37:15 AM: Started saving pip cache
9:37:15 AM: Finished saving pip cache
9:37:15 AM: Started saving emacs cask dependencies
9:37:15 AM: Finished saving emacs cask dependencies
9:37:15 AM: Started saving maven dependencies
9:37:15 AM: Finished saving maven dependencies
9:37:15 AM: Started saving boot dependencies
9:37:15 AM: Finished saving boot dependencies
9:37:15 AM: Started saving rust rustup cache
9:37:15 AM: Finished saving rust rustup cache
9:37:15 AM: Started saving go dependencies
9:37:15 AM: Finished saving go dependencies
9:37:16 AM: Build failed due to an internal system error: Build script returned non-zero exit code: 4
9:37:16 AM: Failing build: Failed to build site
9:37:16 AM: Finished processing build request in 27.304708261s

Can you share the repository?

That package is maintained by Astro - you most likely need to report the issue there.