JedWatson / react-codemirror

Codemirror Component for React.js
MIT License
1.56k stars 262 forks source link

place is not a function #87

Open the7erm opened 7 years ago

the7erm commented 7 years ago

TypeError: place is not a function[Learn More] bundle.js:56747:13

      if (place) {
        if (place.appendChild) { place.appendChild(d.wrapper) }
        else { place(d.wrapper) }
      }

I'm not sure what's going on here. The else { place(d.wrapper) } line is throwing that error. Is there a specific version of codemirror that's required?

the7erm commented 7 years ago

This is what I have installed.

$ npm list | grep codemirror
├── codemirror@5.23.0
├─┬ react-codemirror@0.3.0
the7erm commented 7 years ago

FYI: I ran npm install codemirror@5.18.2 --save and this seems to have fixed the bug. It appears that the newest version of codemirror 5.23.0 isn't compatible with react-codemirror

jpatel3 commented 7 years ago

Not sure how you got react-codemirror 0.3.0 version. I am running into the same issue - 'place is not a function' with 0.2.6 (which seems to be latest version for react-codemirror)

frankjar commented 7 years ago

i have had this issue, just because i have imported the wrong module for CodeMirror

I had : import CodeMirror from "codemirror";

Error fixed like this : import CodeMirror from "react-codemirror";