-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to resolve entry for package "@sveltejs/package". #3886
Comments
Hello @lagden. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
This is the solution that worked out for me: sveltejs/vite-plugin-svelte#710 (comment) i.e. bumping |
I just found the same issue. After upgrading from vitest I confirmed this by going back to Toggle to view full error log⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: Failed to resolve entry for package "@sveltejs/package". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@sveltejs/package" package
❯ packageEntryFailure node_modules/vite/dist/node/chunks/dep-bb8a8339.js:28725:11
❯ resolvePackageEntry node_modules/vite/dist/node/chunks/dep-bb8a8339.js:28720:9
❯ tryNodeResolve node_modules/vite/dist/node/chunks/dep-bb8a8339.js:28453:20
❯ Context.resolveId node_modules/vite/dist/node/chunks/dep-bb8a8339.js:28212:28
❯ Object.resolveId node_modules/vite/dist/node/chunks/dep-bb8a8339.js:44276:64
❯ async file:/Users/project/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:65922:21
❯ async file:/Users/project/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:44925:20
❯ addManuallyIncludedOptimizeDeps node_modules/vite/dist/node/chunks/dep-bb8a8339.js:46108:31
❯ optimizeServerSsrDeps node_modules/vite/dist/node/chunks/dep-bb8a8339.js:45712:5
❯ createDevSsrDepsOptimizer node_modules/vite/dist/node/chunks/dep-bb8a8339.js:45630:22
project % fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
github.com/evanw/esbuild/internal/helpers.(*ThreadSafeWaitGroup).Wait(...)
github.com/evanw/esbuild/internal/helpers/waitgroup.go:36
main.runService.func2()
github.com/evanw/esbuild/cmd/esbuild/service.go:114 +0x59
main.runService(0x1)
github.com/evanw/esbuild/cmd/esbuild/service.go:160 +0x4ed
main.main()
github.com/evanw/esbuild/cmd/esbuild/main.go:240 +0xa29
goroutine 18 [chan receive]:
main.runService.func1()
github.com/evanw/esbuild/cmd/esbuild/service.go:98 +0x4a
created by main.runService
github.com/evanw/esbuild/cmd/esbuild/service.go:97 +0x1e5
goroutine 19 [chan receive]:
main.(*serviceType).sendRequest(0xc000099ef0, {0x150edc0, 0xc000099e00})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa
main.runService.func3()
github.com/evanw/esbuild/cmd/esbuild/service.go:125 +0x39
created by main.runService
github.com/evanw/esbuild/cmd/esbuild/service.go:122 +0x31c
goroutine 54 [semacquire]:
sync.runtime_Semacquire(0xc000211ac0?)
runtime/sema.go:62 +0x27
sync.(*WaitGroup).Wait(0x1539b40?)
sync/waitgroup.go:116 +0x4b
github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints(0xc000281680, {0xc000174120, 0x7, 0x1667ad8?})
github.com/evanw/esbuild/internal/bundler/bundler.go:1692 +0xe52
github.com/evanw/esbuild/internal/bundler.ScanBundle(_, {_, _, _, _, _, _}, {_, _}, 0xc0000ae480, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:1253 +0xaee
github.com/evanw/esbuild/pkg/api.rebuildImpl({0xc0000ae480, {0xc0000a04c8, 0x1, 0x1}, {0x0, 0x0, 0x0}, {0x0, 0x1, 0x2, ...}, ...}, ...)
github.com/evanw/esbuild/pkg/api/api_impl.go:1495 +0x305
github.com/evanw/esbuild/pkg/api.(*internalContext).rebuild(_)
github.com/evanw/esbuild/pkg/api/api_impl.go:1024 +0x28c
github.com/evanw/esbuild/pkg/api.(*internalContext).Rebuild(0xc000125900?)
github.com/evanw/esbuild/pkg/api/api_impl.go:1085 +0x58
main.(*serviceType).handleIncomingPacket.func5()
github.com/evanw/esbuild/cmd/esbuild/service.go:293 +0xd5
created by main.(*serviceType).handleIncomingPacket
github.com/evanw/esbuild/cmd/esbuild/service.go:290 +0x118d
goroutine 57 [chan send]:
github.com/evanw/esbuild/internal/bundler.ScanBundle.func2()
github.com/evanw/esbuild/internal/bundler/bundler.go:1193 +0x2c5
created by github.com/evanw/esbuild/internal/bundler.ScanBundle
github.com/evanw/esbuild/internal/bundler/bundler.go:1191 +0x93b
goroutine 16 [chan receive]:
main.(*serviceType).sendRequest(0xc000099ef0, {0x150edc0, 0xc00026b7d0})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa
main.(*serviceType).convertPlugins.func2.3({{0xc0004369c0, 0xf}, {0x0, 0x0}, {0x0, 0x0}, {0xc0003e2440, 0x36}, 0x1, {0x0, ...}})
github.com/evanw/esbuild/cmd/esbuild/service.go:969 +0x785
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0xc0004369c0, 0xf}, {0xc0003e2440, 0x36}, {0x0, 0x0}, {{0x0, 0x0}, {0x0, 0x0}, ...}, ...})
github.com/evanw/esbuild/pkg/api/api_impl.go:1920 +0x215
github.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({_, _, _}, _, {0xc00047e1c0, 0xc00047c498, 0xc00047c4b0, 0xc0004173e0, 0x5, 0xc00012e7b0}, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:828 +0x8d5
github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints.func1(0x0, {{0xc0004369c0, 0xf}, {0x0, 0x0}, 0x0})
github.com/evanw/esbuild/internal/bundler/bundler.go:1650 +0x205
created by github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints
github.com/evanw/esbuild/internal/bundler/bundler.go:1643 +0xc3a
goroutine 65 [chan receive]:
main.(*serviceType).sendRequest(0xc000099ef0, {0x150edc0, 0xc00026b800})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa
main.(*serviceType).convertPlugins.func2.3({{0xc0004369d0, 0xd}, {0x0, 0x0}, {0x0, 0x0}, {0xc0003e2440, 0x36}, 0x1, {0x0, ...}})
github.com/evanw/esbuild/cmd/esbuild/service.go:969 +0x785
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0xc0004369d0, 0xd}, {0xc0003e2440, 0x36}, {0x0, 0x0}, {{0x0, 0x0}, {0x0, 0x0}, ...}, ...})
github.com/evanw/esbuild/pkg/api/api_impl.go:1920 +0x215
github.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({_, _, _}, _, {0xc00047e1c0, 0xc00047c498, 0xc00047c4b0, 0xc0004173e0, 0x5, 0xc00012e7b0}, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:828 +0x8d5
github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints.func1(0x1, {{0xc0004369d0, 0xd}, {0x0, 0x0}, 0x0})
github.com/evanw/esbuild/internal/bundler/bundler.go:1650 +0x205
created by github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints
github.com/evanw/esbuild/internal/bundler/bundler.go:1643 +0xc3a
goroutine 66 [chan receive]:
main.(*serviceType).sendRequest(0xc000099ef0, {0x150edc0, 0xc00026b830})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa
main.(*serviceType).convertPlugins.func2.3({{0xc0003ce768, 0x11}, {0x0, 0x0}, {0x0, 0x0}, {0xc0003e2440, 0x36}, 0x1, {0x0, ...}})
github.com/evanw/esbuild/cmd/esbuild/service.go:969 +0x785
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0xc0003ce768, 0x11}, {0xc0003e2440, 0x36}, {0x0, 0x0}, {{0x0, 0x0}, {0x0, 0x0}, ...}, ...})
github.com/evanw/esbuild/pkg/api/api_impl.go:1920 +0x215
github.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({_, _, _}, _, {0xc00047e1c0, 0xc00047c498, 0xc00047c4b0, 0xc0004173e0, 0x5, 0xc00012e7b0}, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:828 +0x8d5
github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints.func1(0x2, {{0xc0003ce768, 0x11}, {0x0, 0x0}, 0x0})
github.com/evanw/esbuild/internal/bundler/bundler.go:1650 +0x205
created by github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints
github.com/evanw/esbuild/internal/bundler/bundler.go:1643 +0xc3a
goroutine 67 [chan receive]:
main.(*serviceType).sendRequest(0xc000099ef0, {0x150edc0, 0xc00026b860})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa
main.(*serviceType).convertPlugins.func2.3({{0xc0004369e0, 0xe}, {0x0, 0x0}, {0x0, 0x0}, {0xc0003e2440, 0x36}, 0x1, {0x0, ...}})
github.com/evanw/esbuild/cmd/esbuild/service.go:969 +0x785
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0xc0004369e0, 0xe}, {0xc0003e2440, 0x36}, {0x0, 0x0}, {{0x0, 0x0}, {0x0, 0x0}, ...}, ...})
github.com/evanw/esbuild/pkg/api/api_impl.go:1920 +0x215
github.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({_, _, _}, _, {0xc00047e1c0, 0xc00047c498, 0xc00047c4b0, 0xc0004173e0, 0x5, 0xc00012e7b0}, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:828 +0x8d5
github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints.func1(0x3, {{0xc0004369e0, 0xe}, {0x0, 0x0}, 0x0})
github.com/evanw/esbuild/internal/bundler/bundler.go:1650 +0x205
created by github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints
github.com/evanw/esbuild/internal/bundler/bundler.go:1643 +0xc3a
goroutine 68 [chan receive]:
main.(*serviceType).sendRequest(0xc000099ef0, {0x150edc0, 0xc00026b890})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa
main.(*serviceType).convertPlugins.func2.3({{0xc0004369f0, 0xd}, {0x0, 0x0}, {0x0, 0x0}, {0xc0003e2440, 0x36}, 0x1, {0x0, ...}})
github.com/evanw/esbuild/cmd/esbuild/service.go:969 +0x785
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0xc0004369f0, 0xd}, {0xc0003e2440, 0x36}, {0x0, 0x0}, {{0x0, 0x0}, {0x0, 0x0}, ...}, ...})
github.com/evanw/esbuild/pkg/api/api_impl.go:1920 +0x215
github.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({_, _, _}, _, {0xc00047e1c0, 0xc00047c498, 0xc00047c4b0, 0xc0004173e0, 0x5, 0xc00012e7b0}, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:828 +0x8d5
github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints.func1(0x4, {{0xc0004369f0, 0xd}, {0x0, 0x0}, 0x0})
github.com/evanw/esbuild/internal/bundler/bundler.go:1650 +0x205
created by github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints
github.com/evanw/esbuild/internal/bundler/bundler.go:1643 +0xc3a
goroutine 69 [chan receive]:
main.(*serviceType).sendRequest(0xc000099ef0, {0x150edc0, 0xc00026b8c0})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa
main.(*serviceType).convertPlugins.func2.3({{0xc000436a00, 0xc}, {0x0, 0x0}, {0x0, 0x0}, {0xc0003e2440, 0x36}, 0x1, {0x0, ...}})
github.com/evanw/esbuild/cmd/esbuild/service.go:969 +0x785
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0xc000436a00, 0xc}, {0xc0003e2440, 0x36}, {0x0, 0x0}, {{0x0, 0x0}, {0x0, 0x0}, ...}, ...})
github.com/evanw/esbuild/pkg/api/api_impl.go:1920 +0x215
github.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({_, _, _}, _, {0xc00047e1c0, 0xc00047c498, 0xc00047c4b0, 0xc0004173e0, 0x5, 0xc00012e7b0}, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:828 +0x8d5
github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints.func1(0x5, {{0xc000436a00, 0xc}, {0x0, 0x0}, 0x0})
github.com/evanw/esbuild/internal/bundler/bundler.go:1650 +0x205
created by github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints
github.com/evanw/esbuild/internal/bundler/bundler.go:1643 +0xc3a
goroutine 70 [chan receive]:
main.(*serviceType).sendRequest(0xc000099ef0, {0x150edc0, 0xc00026b7a0})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0xfa
main.(*serviceType).convertPlugins.func2.3({{0xc0004369ba, 0x6}, {0x0, 0x0}, {0x0, 0x0}, {0xc0003e2440, 0x36}, 0x1, {0x0, ...}})
github.com/evanw/esbuild/cmd/esbuild/service.go:969 +0x785
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0xc0004369ba, 0x6}, {0xc0003e2440, 0x36}, {0x0, 0x0}, {{0x0, 0x0}, {0x0, 0x0}, ...}, ...})
github.com/evanw/esbuild/pkg/api/api_impl.go:1920 +0x215
github.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({_, _, _}, _, {0xc00047e1c0, 0xc00047c498, 0xc00047c4b0, 0xc0004173e0, 0x5, 0xc00012e7b0}, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:828 +0x8d5
github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints.func1(0x6, {{0xc0004369ba, 0x6}, {0x0, 0x0}, 0x0})
github.com/evanw/esbuild/internal/bundler/bundler.go:1650 +0x205
created by github.com/evanw/esbuild/internal/bundler.(*scanner).addEntryPoints
github.com/evanw/esbuild/internal/bundler/bundler.go:1643 +0xc3a Toggle to view system info System:
OS: macOS 13.4.1
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 1.18 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
Browsers:
Chrome: 118.0.5993.117
Firefox: 100.0
Safari: 16.5.1
npmPackages:
@sveltejs/adapter-static: 2.0.3 => 2.0.3
@sveltejs/kit: 1.27.1 => 1.27.1
@sveltejs/package: 2.2.2 => 2.2.2
@sveltejs/vite-plugin-svelte: 2.4.2 => 2.4.6
@vitest/coverage-v8: 0.34.6 => 0.34.6
svelte: 4.2.2 => 4.2.2
vite: 4.5.0 => 4.5.0
vitest: 0.34.6 => 0.34.6 Note: The workaround mentioned by @peterpeterparker does indeed fix it. Edit:
...but for some reason npm just didn't want to update @sveltejs/vite-plugin-svelte past v2.4.2 if I installed an updated version of kit. |
Describe the bug
See the video!
The error happens when update to latest version (0.34.1).
error.mp4
Reproduction
I don't know if it's just a
sveltekit
problem.To get the error, update
vitest
to latest version (0.34.1).Example:
Open the link and run:
System Info
The text was updated successfully, but these errors were encountered: