Closed amr3k closed 9 months ago
I can't reproduce this. https://stackblitz.com/edit/sveltejs-kit-template-default-xw6jml?description=The%20default%20SvelteKit%20template,%20generated%20with%20create-svelte&file=vite.config.js&title=SvelteKit%20Default%20Template Please provide a minimal reproduction.
@eltigerchino If it helps anyone, I've got it here https://github.com/pockethost/pockethost/actions/runs/7152645710/job/19478195164#step:6:342
Builds fine on local (OS X) but not in CI
@benallfree you need to provide a newly created project that reproduces the coredump.
@benallfree Have you been able to fix it?
@amr3k Unfortunately no, and it looks like they closed the issue :(
@eltigerchino can we please leave this issue open, I think it is real as it has been reported by several users. I did not create the issue I was just trying to add a breadcrumb.
I'm experiencing the same.
System:
OS: Linux 6.5 Ubuntu 23.10 23.10 (Mantic Minotaur)
CPU: (8) x64 AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
Memory: 7.07 GB / 30.78 GB
Container: Yes
Shell: 5.2.15 - /bin/bash
Binaries:
Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
pnpm: 8.12.1 - ~/.nvm/versions/node/v20.10.0/bin/pnpm
bun: 1.0.8 - ~/.bun/bin/bun
Browsers:
Chrome: 120.0.6099.109
npmPackages:
@sveltejs/adapter-auto: ^2.1.1 => 2.1.1
@sveltejs/enhanced-img: ^0.1.6 => 0.1.6
@sveltejs/kit: ^1.27.6 => 1.27.6
svelte: ^4.2.4 => 4.2.4
vite: ^4.5.0 => 4.5.0
Please provide a minimal reproduction in a repository. It will help us identify the issue more easily
For anyone who can devote some time, I think the easiest reproduction is to create a github action that attempts to build a Sveltekit project that uses this feature. There is something about the github CI environment that causes the core dump.
@eltigerchino
I was able to narrow down the issue to another package NOT related to svelte, which uses an outdated version of sharp
.
So this issue should be closed, I will however put my solution here for future reference.
The issue in my case was the using of @dotlottie/player-component
along with @sveltejs/enhanced-img
in the same project.
@sveltejs/enhanced-img
uses sharp===0.33.1
while @dotlottie/player-component
uses sharp as follows:
> pnpm why sharp
dependencies:
@dotlottie/player-component 2.7.3
└─┬ @dotlottie/common 0.7.4
└─┬ @dotlottie/dotlottie-js 0.6.0
├── sharp 0.32.5
└─┬ sharp-phash 2.1.0
└── sharp 0.32.5 peer
@sveltejs/enhanced-img 0.1.7
└─┬ vite-imagetools 6.2.8
└─┬ imagetools-core 6.0.3
└── sharp 0.33.1
The interesting part is that using @dotlottie/player-component
without @sveltejs/enhanced-img
works fine and vice versa, but putting those together causes that error!
Apart from waiting for @dotlottie/dotlottie-js
to update their dependencies, there's another solution to force pnpm to use sharp 0.33.1
for all of my dependencies.
This is done by the following steps:
node_modules
directorypnpm-lock.yaml
.pnpmfile.cjs
with the following:module.exports = {
hooks: {
readPackage(packageJson) {
if (packageJson.dependencies && packageJson.dependencies['sharp']) {
packageJson.dependencies['sharp'] = '^0.33.1';
}
return packageJson;
},
},
};
pnpm i
module.exports = { hooks: { readPackage(packageJson) { if (packageJson.dependencies && packageJson.dependencies['sharp']) { packageJson.dependencies['sharp'] = '^0.33.1'; } return packageJson; }, }, };
Thank you senpai
Hello and sorry to bump this issue, I had the same exact issue as @amr3k
Using linux mint 21.x with pnpm, perhaps this issue should be added to documentation, just in case other linux users face issues
Describe the bug
Using
@sveltejs/enhanced-img
causes the server to fail with this message:Reproduction
@sveltejs/enhanced-img
and set it up as described in the docs.pnpm run dev
.Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
I couldn't reproduce in stackblitz.