-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
0.33.3
Throws TypeError: A string was expected
#4095
Comments
Nothing in the stack trace provided here is from within sharp itself. If you still require help you'll need to provide some sample code that allows someone else to reproduce or at least better understand how you're trying to use sharp. |
Thanks for a quick response. Yeah, I know, it's minimized code (sorry). Sadly I can't get full trace from our deployed instance. All calls to
The exception happens right here (I've added some logs right before & after the code above to be sure) Nothing fancy. As I mentioned, it works perfectly fine locally, and in Azure on version Really not sure what's going on and I'm fine with staying on older version, but figured I could post it here just in case others encounter(ed) same issue. |
My best guess would be that logic in your bundling step is erroneously polyfilling (i.e. monkey-patching) something fundamental, perhaps Please can you try 0.33.1 and 0.33.2 to help narrow this down. |
I don't think the bundling should be a problem here as it works with older versions. It's an Angular 17 SSR app (just FYI). This code is executed strictly on server (Node 20 - LTS on Linux). I did several new releases one by one:
The only changes between these releases are |
My best guess remains that something is being polyfilled in an unexpected or broken way. Can you prevent Angular from generating polyfills for the server side code? If not, what objects and functions are being polyfilled by Looking at the changes to sharp between v0.33.2 and v0.33.3 there is 7bc74fe that introduces the use of |
Getting the same error on my apollo server.
both variables are paths /srv/http/blabla.jpg etc
|
Please can you create a standalone repo with minimal dependencies that allows someone else to reproduce. |
Yes i will try to do that! I'm not that experienced in repos. Do i do that on github or some pastebin variant? |
Yes please, that would be ideal, I'd expect to see a |
Sorry for late reply. I was working on the minimal repo but didnt mange to get the error. Then i saw that i now used 0.33.4. And the problem seems to be gone? So no need to work any more on it? :) |
@Enngage Were you able to make any progress with this? |
Hey @lovell, I've tried upgrading to |
Thanks for the update.
When you say "simplest example", is this with sharp as the only dependency, or are you still using Angular and therefore at the mercy of its Sadly, without a complete, minimal repo declaring the dependencies, code and build steps that will allow someone else to reproduce, there's not a lot anyone can do to help. |
Maybe my started working with 34 is because I upgraded to node 22 aswell ? |
Possible bug
Locally everything works fine, but our deployment in Azure (Node 20 LTS, linux) started throwing exceptions such as:
Everything works perfectly fine with
0.33.0
. The dependency version change is the only difference in deployments. It works perfectly fine locally even with latest version0.33.0
.Not sure if I can provide more information since it's a bit unfortunate error and only reproducable within Azure.
The text was updated successfully, but these errors were encountered: