-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
Description
Describe the bug
In one of our components we type import ActionReturn from svelte/action:
import { type ActionReturn } from 'svelte/action';When running pnpm dev on our SvelteKit project we get the following error in the terminal:
✘ [ERROR] No known conditions for "./action" specifier in "svelte" package [plugin vite:dep-scan]
script:/frontend/apps/kvist/src/ui/components/KvistPopover/KvistPopover.svelte?id=0:70:7:
70 │ import 'svelte/action'
╵ ~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
../../node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///frontend/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-CfG9u7Cn.js:18418:13)
at handlePlugins (/frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:699:5)
at /frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:2038:68
at new Promise (<anonymous>)
at Object.context (/frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:2038:27)
at Object.context (/frontend/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1880:58)
at prepareEsbuildScanner (file:///frontend/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-CfG9u7Cn.js:18206:24)
This error seems to be a kind error, as everything works as expected, but it's a little unlucky to get this error every time we boot up our dev-server.
Reproduction
https://github.com/MathiasWP/no-known-condition-for-action
Logs
System Info
System:
OS: macOS 15.2
CPU: (8) arm64 Apple M1 Pro
Memory: 966.75 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 23.6.1 - /opt/homebrew/bin/node
npm: 10.9.2 - /opt/homebrew/bin/npm
pnpm: 10.1.0 - /opt/homebrew/bin/pnpm
bun: 1.0.0 - ~/.bun/bin/bun
Browsers:
Brave Browser: 131.1.73.104
Chrome: 132.0.6834.160
Edge: 132.0.2957.140
Safari: 18.2
npmPackages:
svelte: ^5.19.9 => 5.19.9Severity
annoyance