Skip to content

Invalid source URL: first path segment in URL cannot contain colon #9078

@kaishin

Description

@kaishin

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions & operating system are you using?

Wrangler 4.13.2

Please provide a link to a minimal reproduction

No response

Describe the Bug

When running the wrangler pages dev command in a freshly created Astro project using the command from the docs pnpm create cloudflare@latest my-astro-app --framework=astro --platform=pages, the following warning is displayed on the terminal console:

▲ [WARNING] Invalid source URL: first path segment in URL cannot contain colon [invalid-source-url]

Please provide any relevant error logs

> astro build && wrangler pages dev

11:54:21 [@astrojs/cloudflare] Enabling sessions with Cloudflare KV. Be sure to define a KV binding named "SESSION".
11:54:21 [@astrojs/cloudflare] If you see the error "Invalid binding `SESSION`" in your build output, you need to add the binding to your wrangler config file.
11:54:21 [WARN] [@astrojs/cloudflare] [@astrojs/cloudflare] This adapter is intended to be used with server rendered pages, which this project does not contain any of. As such, this adapter is unnecessary.
11:54:21 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
11:54:21 [WARN] [adapter] Cloudflare does not support sharp. You can use the `compile` image service to compile images at build time. It will not work for any on-demand rendered images.
11:54:22 [content] Syncing content
11:54:22 [content] Synced content
11:54:22 [types] Generated 193ms
11:54:22 [build] output: "static"
11:54:22 [build] mode: "server"
11:54:22 [build] directory: <REDACTED>/my-astro-app/dist/
11:54:22 [build] adapter: @astrojs/cloudflare
11:54:22 [build] Collecting build info...
11:54:22 [build] ✓ Completed in 200ms.
11:54:22 [build] Building server entrypoints...
11:54:22 [vite] ✓ built in 420ms
11:54:22 [build] ✓ Completed in 437ms.

 prerendering static routes 
11:54:22 ▶ src/pages/index.astro
11:54:22   └─ /index.html (+8ms) 
11:54:22 ✓ Completed in 13ms.

11:54:22 [build] Rearranging server assets...
11:54:22 [build] Server built in 657ms
11:54:22 [build] Complete!

 ⛅️ wrangler 4.13.2
-------------------

Attaching additional modules:
┌────────────────────────────────────────────────┬──────┬────────────┐
│ Name                                           │ Type │ Size       │
├────────────────────────────────────────────────┼──────┼────────────┤
│ _@astrojs-ssr-adapter.mjs                      │ esm  │ 0.14 KiB   │
├────────────────────────────────────────────────┼──────┼────────────┤
│ _astro-internal_middleware.mjs                 │ esm  │ 0.45 KiB   │
├────────────────────────────────────────────────┼──────┼────────────┤
│ _noop-actions.mjs                              │ esm  │ 0.09 KiB   │
├────────────────────────────────────────────────┼──────┼────────────┤
│ chunks/_@astrojs-ssr-adapter_Bvx2VUxS.mjs      │ esm  │ 33.82 KiB  │
├────────────────────────────────────────────────┼──────┼────────────┤
│ chunks/astro/server_B6Baf3Xl.mjs               │ esm  │ 99.70 KiB  │
├────────────────────────────────────────────────┼──────┼────────────┤
│ chunks/astro-designed-error-pages_DHwfIjJN.mjs │ esm  │ 45.85 KiB  │
├────────────────────────────────────────────────┼──────┼────────────┤
│ chunks/cloudflare-kv-binding_DMly_2Gl.mjs      │ esm  │ 2.94 KiB   │
├────────────────────────────────────────────────┼──────┼────────────┤
│ chunks/index_BmUPEGiE.mjs                      │ esm  │ 97.68 KiB  │
├────────────────────────────────────────────────┼──────┼────────────┤
│ chunks/noop-middleware_CLzGysKN.mjs            │ esm  │ 0.33 KiB   │
├────────────────────────────────────────────────┼──────┼────────────┤
│ manifest_BcNTIjza.mjs                          │ esm  │ 7.74 KiB   │
├────────────────────────────────────────────────┼──────┼────────────┤
│ pages/index.astro.mjs                          │ esm  │ 0.06 KiB   │
├────────────────────────────────────────────────┼──────┼────────────┤
│ renderers.mjs                                  │ esm  │ 0.10 KiB   │
├────────────────────────────────────────────────┼──────┼────────────┤
│ Total (12 modules)                             │      │ 288.90 KiB │
└────────────────────────────────────────────────┴──────┴────────────┘
✨ Compiled Worker successfully
No bindings found.
▲ [WARNING] Invalid source URL: first path segment in URL cannot contain colon [invalid-source-url]

    .wrangler/tmp/pages-TV5wRq/hisio8esmg6.js.map:3:14:
      3 │   "sources": ["<define:__ROUTES__>", "../../../node_modules/.pnpm/w...
        ╵               ~~~~~~~~~~~~~~~~~~~~~

  The source map ".wrangler/tmp/pages-TV5wRq/hisio8esmg6.js.map" was referenced by the file ".wrangler/tmp/pages-TV5wRq/hisio8esmg6.js" here:

    .wrangler/tmp/pages-TV5wRq/hisio8esmg6.js:42:21:
      42 │ //# sourceMappingURL=hisio8esmg6.js.map
         ╵                      ~~~~~~~~~~~~~~~~~~


⎔ Starting local server...
[wrangler:inf] Ready on http://localhost:8788

Metadata

Metadata

Labels

bugSomething that isn't workingregressionBreak in existing functionality as a result of a recent change

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions