Skip to content
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

Missing core-js/modules/es7.object.entries #103

Closed
benwaffle opened this issue Aug 15, 2018 · 15 comments
Closed

Missing core-js/modules/es7.object.entries #103

benwaffle opened this issue Aug 15, 2018 · 15 comments
Labels

Comments

@benwaffle
Copy link

benwaffle commented Aug 15, 2018

Error: Cannot find module 'core-js/modules/es7.object.entries'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/me/project/node_modules/apollo-upload-server/lib/middleware.js:14:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

using the latest version of apollo server

image

@mike-marcacci
Copy link
Collaborator

@benwaffle is this showing up when using apollo-server by itself (and its bundled apollo-upload-server) or are you using this library directly?

@mike-marcacci
Copy link
Collaborator

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.

@jaydenseric
Copy link
Owner

jaydenseric commented Aug 16, 2018

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 🙏

@jaydenseric
Copy link
Owner

I think you won't have the issue with apollo-upload-server@6.0.0-alpha.1.

@jaydenseric
Copy link
Owner

Closing since the issue is fixed in the current release.

@benwaffle
Copy link
Author

@mike-marcacci i'm using apollo-server, not apollo-upload-server directly

@jaydenseric
Copy link
Owner

@benwaffle you're stuck, nothing you can do but wait for Apollo to update their apollo-upload-server dependency.

@jaydenseric
Copy link
Owner

Well, actually you can make sure your package-lock.json has the exact dependency you need in it.

@benwaffle
Copy link
Author

installing core-js manually fixes the issue

@jwoptio
Copy link

jwoptio commented Aug 16, 2018

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"
  }

@benwaffle
Copy link
Author

thanks, but i'm using npm

@andyrichardson
Copy link

@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?

@abernix
Copy link

abernix commented Aug 20, 2018

@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.)

@jaydenseric
Copy link
Owner

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.

@abernix
Copy link

abernix commented Aug 20, 2018

Those are certainly compelling reasons to upgrade!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants