netlify / netlify/framework-adapters
'__dirname' has already been declared
@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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.