Update mime dependency to ^4.0.0
The mime package broke today everywhere for 3.0 with messages like this:
I'll take a look at what we can do. It does not look like updating to 4.x is possible as it appears it requires Node >= 16 and we are currently still supporting >= 14. Additionally, it appears 4.x is pure ESM.
+1 got the same error
@MarcAntoineLebourgeois or @thelinuxlich can either of you provide a bit more context. Were you upgrading this library? If so from what version to what version? What is the output from npm ls mime? What is the version of node you are using?
Node 20, here's the output:
And it started happening after a pnpm -r up indeed
You can see a @types/[email protected] there, I had to force it with overrides on the package.json to make it work.
Another one: https://github.com/firebase/firebase-admin-node/issues/2512
Thanks @thelinuxlich I'll take a closer look at what could be happening.
Just want to add my two cent on this issue.
googleapis/nodejs-storage is using the correct version of @types/mime in dev dependencies.
Since there is no @types/mime is provided, any @types/mime install will cause problem.
But wait, it is not a problem of googleapi/nodejs-storage.
What we should done is find out which exact package is linking the @types/mime@4.
Similar to https://github.com/firebase/firebase-admin-node/issues/2512#issuecomment-2029100180 and the proper fix should be fixing the wrong linked package (e.g. @types/serve-static) instead of this library.
Reference to shown that https://github.com/fastify/send/issues/60#issuecomment-2030997289
Without install @types/mime, it should be good to use inside TypeScript.
I did some sanity checking and as @climba03003 noted this library is using @types/mime ^3.0.0. https://github.com/googleapis/nodejs-storage/blob/36d27212848a1002cc0fa699364a446c4f8d25e4/package.json#L102
I don't think there is a fix to be made in this library.
Going to close this out as there does not appear to be anything to be done on the storage library side.