-
Notifications
You must be signed in to change notification settings - Fork 61
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
Cannot find module 'core-js/modules/es6.object.define-property' #69
Comments
Installing Agree with the above that this should not be the case. |
Yes - currently Relay only supports core-js@2. This is not a problem with react-relay-network-modern, but with relay-runtime itself. |
@oreqizer The better way is use the lib from es dir:
|
import { XXX } from 'react-relay-network-modern/es' is not an option for me as I'm also using react-relay-network-modern-ssr, which imports from 'react-relay-network-modern/lib' |
This package needs to either specify an explicit dependency on core-js v2.x. Though in general, it's probably best not to use env with |
I'm welcome to any performant solution.
If you know how to fix this problem, please send a pull request. Tnx. |
It's a moot point. You're depending on core-js v2 anyway, so those files will get pulled in no matter what. There's no way to avoid pulling in core-js v2; that code literally won't work without it. And in practice only the modules in use will get pulled in. |
Not including a required dependency doesn't help with bundle size. It's not possible to use this library without |
For this repository, I don't think it needs to consider the runtime-env. A and B project depend on RRNL, A project only need to consider newest browser, but B project user usually use old browser. Be compatible for every user, it is too difficult. So, we only need do it: If |
I am facing this error: |
Hi guys,
|
@jgcmarins did you solve this? I'm facing the same issue where I only get errors in my builds but when I run locally I get no errors. It's very confusing. |
If folks are running into this and don't necessarily need all the nice features in RRNM, we've written and switched to: https://github.com/4Catalyzer/relay-network-layer which is a good bit smaller (at the expense of other features) but still includes, batching and auth |
Solved my own problem. I do need core-js:2.6.9 but the issue I was seeing is that webpack would build locally but not in my docker. So I was really confused about that. It turns out locally i'm in a monorepo and the node_modules higher up the chain had the correct dependency. However in docker I only pushed my project so it couldn't a core-js version it needed. This explains why it was working locally but not in docker. |
@simkessy, I am using |
Stupid question, but does relay itself use Looks like importing from I think there should definitely be something in the readme explaining this. |
…/modules/es6.*')
Getting
when running my server.
Installed:
[email protected]
[email protected]
Installing
[email protected]
fixes the issue, but that's an obsolete dependency, would really like to avoid having to use it.The text was updated successfully, but these errors were encountered: