netlify / netlify/framework-adapters

Vite adapter causes development server to throw on launch

Open
#67 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1
Forks
3
Avg merge
1d 7h
Merged PRs (30d)
9

Description

Tried spinning up a quick Vite/Vue project this morning and found that the Netlify adapter was throwing an error when using the dev server:

error: unexpected argument '--allow-scripts' found
file:///Users/.../node_modules/.pnpm/@netlify+edge-functions-dev@2.0.1/node_modules/@netlify/edge-functions-dev/dist/node/main.js:317
        throw new Error("Could not establish a connection to the Netlify Edge Functions local development server");
              ^

Error: Could not establish a connection to the Netlify Edge Functions local development server

I've got a minimum viable replication of a project that causes the issue linked below. It looks to be isolated to the edge functions local development server, as switching that feature off causes the dev server to launch successfully.

https://github.com/mxbranch/netlify-vite-error-demo

I also noticed this happening on an Astro project. I did not have this issue with the Astro Netlify adapter when I last spun up that project locally two weeks ago, which could suggest a recent regression.

  • OS: MacOS 26.5.2, M2 Processor (also replicated on an M2 Pro)
  • Node: 26.8.2
  • Tested with package managers:
    • pnpm: 12.3.4
    • npm: 11.19.1 (should really update that, whoops)

Let me know if you need any more details!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Vite/Vue reproduction and the adapter's edge-functions local development server, focusing on the launch path that passes the unsupported --allow-scripts argument. Compare the Vite and Astro adapter behavior around that server startup. Done means the development server launches successfully with edge functions enabled in the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript, vite
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.