react-relay-network-modern: Cannot find module 'core-js/modules/es6.object.define-property'

Getting

Error: Cannot find module 'core-js/modules/es6.object.define-property'

when running my server.

Installed:

  • core-js@3.1.4
  • react-relay-network-modern@4.0.1

Installing core-js@2.6.9 fixes the issue, but that’s an obsolete dependency, would really like to avoid having to use it.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 3
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Stupid question, but does relay itself use core-js@2.* still? I was able to use relay without a problem, and when I tried importing from default RRNM package folder project wouldn’t compile.

Looks like importing from react-relay-network-modern/es fixes it for me.

I think there should definitely be something in the readme explaining this.

Installing core-js@2.6.9 fixes this!

Agree with the above that this should not be the case.

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’

@oreqizer If you want to use core-js@v3.x.

The better way is use the lib from es dir:

import { XXX } from 'react-relay-network-modern/es'