react-beautiful-dnd icon indicating copy to clipboard operation
react-beautiful-dnd copied to clipboard

Uncaught TypeError: Cannot use 'in' operator to search for 'default' in undefined

Open terrynguyen255 opened this issue 4 years ago • 3 comments

Hi all, Thank you for this awesome lib!

Actual behavior

I've integrated it, everything works well, except an error is showing in console while loading the component:

From file: react-beautiful-dnd.js:7
Uncaught TypeError: Cannot use 'in' operator to search for 'default' in undefined
    at react-beautiful-dnd.js:7
    at react-beautiful-dnd.js:4
    at react-beautiful-dnd.js:5

on this snippet

var React__default = 'default' in React ? React['default'] : React;
var ReactDOM__default = 'default' in ReactDOM ? ReactDOM['default'] : ReactDOM;

Expected behavior

No errors

Steps to reproduce

The error doesn't occur in our sandbox

Suggested solution?

I'm not sure if this is related to this rollup issue or not

What version of React are you using?

[email protected] [email protected]

What version of react-beautiful-dnd are you running?

[email protected]

What browser are you using?

  • Version 83.0.4103.61 (Official Build) (64-bit) for Ubuntu
  • Firefox 77.0.1 (64-bit) for Ubuntu

Demo

The error doesn't occur in our sandbox

terrynguyen255 avatar Jun 23 '20 08:06 terrynguyen255

i'm facing the same issue is there any fix/suggestions?

dmiles-payem avatar Jun 06 '23 11:06 dmiles-payem

I am running into this issue as well.

Concrete18 avatar Aug 25 '23 21:08 Concrete18

window.React = React
window.ReactDOM = ReactDOM
setTimeout(()=>{
  insertScript('/dist/react-beautiful-dnd.js')
},2000)

miroku-y avatar Sep 06 '23 04:09 miroku-y