Skip to content

'__dirname' has already been declared #9

Description

@johnf

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions