Description
Describe the bug
The following message is printed (multiple times if using a monorepo):
If bundling, conditions should include development or production. If not bundling, conditions or NODE_ENV should include development or production. See https://www.npmjs.com/package/esm-env for tips on setting conditions in popular bundlers and runtimes.
I've read the printed link several times, but I can't figure out what it is telling me I need to do (at least anything I've done has not removed the message) - in any case, sv
really ought to create code that doesn't produce warnings ;-)
Reproduction
Normally you get this when running pnpm build
(or turbo build
in my case) in CI, but you can very simply reproduce it like so:
> sv create sk-sync-bug
┌ Welcome to the Svelte CLI! (v0.6.9)
│
◇ Which template would you like?
│ Svelte library
│
◇ Add type checking with Typescript?
│ Yes, using Typescript syntax
│
◆ Project created
│
◇ What would you like to add to your project? (use arrow keys / space bar)
│ none
│
◇ Which package manager do you want to install dependencies with?
│ pnpm
│
◆ Successfully installed dependencies
│
◇ Project next steps ─────────────────────────────────────────────────────╮
│ │
│ 1: cd sk-sync-bug │
│ 2: git init && git add -A && git commit -m "Initial commit" (optional) │
│ 3: pnpm dev --open │
│ │
│ To close the dev server, hit Ctrl-C │
│ │
│ Stuck? Visit us at https://svelte.dev/chat │
│ │
├──────────────────────────────────────────────────────────────────────────╯
│
└ You're all set!
> cd sk-sync-bug
sk-sync-bug> pnpm up *
....
sk-sync-bug> pnpm i
...
sk-sync-bug> pnpm svelte-kit sync
If bundling, conditions should include development or production. If not bundling, conditions or NODE_ENV should include development or production. See https://www.npmjs.com/package/esm-env for tips on setting conditions in popular bundlers and runtimes.
A repo with the above is available at: https://github.com/thebjorn/sk-sync-bug
Logs
see above
System Info
System:
OS: Windows 11 10.0.22631
CPU: (48) x64 AMD Ryzen Threadripper 3960X 24-Core Processor
Memory: 25.88 GB / 63.88 GB
Binaries:
Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.15.1 - ~\AppData\Local\pnpm\pnpm.CMD
bun: 1.1.41 - ~\AppData\Roaming\npm\bun.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
npmPackages:
@sveltejs/adapter-auto: ^3.3.1 => 3.3.1
@sveltejs/kit: ^2.15.0 => 2.15.0
@sveltejs/package: ^2.3.7 => 2.3.7
@sveltejs/vite-plugin-svelte: ^5.0.3 => 5.0.3
svelte: ^5.15.0 => 5.15.0
vite: ^6.0.5 => 6.0.5
Severity
annoyance
Additional Information
No response