netlify / netlify/framework-adapters

'__dirname' has already been declared

Open
#9 1 comment 0 reactions 1 assignee View on GitHub

@serhalp is already working on this.

Since Nov 6, 2025.

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

Description

I tried switching to @netlify/vite-plugin-tanstack-start using version 1.1.6

When I deploy to netlify I get an error in the webpage

'__dirname' has already been declared

This is coming from open which is a sup-dep of this package via @azure/identity

The netlify esbuild config is inclusing a shim https://github.com/netlify/build/blob/4f7e46fc7c57a80edcb7b7df6e278f9b6648651d/packages/zip-it-and-ship-it/src/runtimes/node/bundlers/esbuild/bundler.ts#L13
which defined __dirname which clashes with open which defines it too https://github.com/sindresorhus/open/blob/main/index.js#L16

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.