cloudflare / cloudflare/workerskv.gui

Named export 'transformWithEsbuild' not found.

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Svelte
Stars
315
Forks
23
PR merge metrics
No merged PRs in 30d

Description

any suggestions on how to resolve this would be greatly appreciated.
```
pnpm run build

> @0.0.2 build C:\Users\dhorner\work\workerskv.gui
> tauri build

app:spawn Running "C:\Users\dhorner\work\workerskv.gui\node_modules\.pnpm\@tauri-apps+cli@1.0.0-beta.10\node_modules\@tauri-apps\cli\bin\tauri-cli.exe tauri build" +0ms

[tauri:build] Running `yarn svelte-kit build`
yarn run v1.22.10
warning ..\..\package.json: No license field
$ C:\Users\dhorner\work\workerskv.gui\node_modules\.bin\svelte-kit build
> Named export 'transformWithEsbuild' not found. The requested module 'vite' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'vite';

file:///C:/Users/dhorner/work/workerskv.gui/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@1.0.0-next.36_svelte@3.38.2+vite@2.3.3/node_modules/@sveltejs/vite-plugin-svelte/dist/index.js:827
transformWithEsbuild
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'transformWithEsbuild' not found. The requested module 'vite' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'vite';

at ModuleJob._instantiate (node:internal/modules/esm/module_job:105:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:151:5)
at async Loader.import (node:internal/modules/esm/loader:177:24)
at async file:///C:/Users/dhorner/work/workerskv.gui/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.109_svelte@3.38.2/node_modules/@sveltejs/kit/dist/cli.js:607:22
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: failed to run `yarn svelte-kit build` with `cmd /C`

Caused by:
command failed

app:spawn Command "C:\Users\dhorner\work\workerskv.gui\node_modules\.pnpm\@tauri-apps+cli@1.0.0-beta.10\node_modules\@tauri-apps\cli\bin\tauri-cli.exe" failed with exit code: 1 +0ms
 ELIFECYCLE  Command failed with exit code 1.
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `pnpm run build`, which invokes `tauri build` and `yarn svelte-kit build`. Then inspect the reported `@sveltejs/vite-plugin-svelte/dist/index.js` entry point and the Vite dependency versions shown in the stack trace. Done means the build completes without the `transformWithEsbuild` named-export error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, tauri, vite
Domain
build-system, desktop-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.