Closed benwaffle closed 6 years ago
@benwaffle is this showing up when using apollo-server by itself (and its bundled apollo-upload-server) or are you using this library directly?
Assuming you're on apollo-upload-server 5.0.0, this should be present via the @babel/runtime#7.0.0-beta.40
dependency, which was used in the transpilation and testing.
Babel recently had a big breaking change to the way Babel runtime works, and published it as a new prelease of the same major version as before (7
). Packages that had specified the dependency with a ^
are now broken. We have a new version on the way, although you will need to do a little refactoring to the new API once it's out 🙏
I think you won't have the issue with apollo-upload-server@6.0.0-alpha.1
.
Closing since the issue is fixed in the current release.
@mike-marcacci i'm using apollo-server, not apollo-upload-server directly
@benwaffle you're stuck, nothing you can do but wait for Apollo to update their apollo-upload-server
dependency.
Well, actually you can make sure your package-lock.json
has the exact dependency you need in it.
installing core-js manually fixes the issue
Using yarn you can specify specific sub-dependency versions using the resolutions block in your package.json
:
ie:
"resolutions": {
"apollo-server-lambda/**/apollo-upload-server": "6.0.0-alpha.1"
}
thanks, but i'm using npm
@jaydenseric Apollo likely won't be updating to the 6.0.0-alpha.1 release due to dropped support for Node 6.x.
Is a 5.0.1 release with core-js an option?
@jaydenseric Would you accept a PR for a (proposed) v5.0.1, branched off the v5.0.0
tag which switches @babel/runtime
to @babel/runtime-corejs2
(and the appropriate changes)?
I've staged what that would look like on a fork of this repository that I just made here: https://github.com/apollographql/apollo-upload-server/pull/1, and this seems to do the trick! (Though npm test
is exhibiting failures both before and after my change, and I'm not sure what the reason is.)
There are other, critical reasons to upgrade other than the recent dependency issue. People can crash your server process by sending a malformed request. Or a file too large, and other bugs fixed in the newest releases.
Those are certainly compelling reasons to upgrade!
using the latest version of apollo server