Hey,
Thanks for the library. I'm trying to use this with webpack (I'm really just trying to put it in a barebones app created with create-react-app). Looking at your webpack example I can't find any differences that would be causing this error, but maybe I am missing something obvious. Screenshots of the error attached below


I have no idea what was causing this... rm -rf node_modules didn't fix the issue but nuking the whole project and recloning did ¯_(ツ)_/¯
happens to me too, no simple way to resolve it?
+1
I bumped into the same issue. Got no idea how to fix this.
+1
re-opening since it seems others are having the same issue
Hi all, as of 4.1.6 creat-react-app should work. https://github.com/securingsincity/react-ace-create-react-app-example as an example
Any idea what actually causes this though? I'm trying to use react-ace in a larger project and I'm getting this error. Clearing node_modules didn't help. React 15.4.2
I am getting the same error even though I am using 4.2.0 version. I removed everything and am just importing the two things i.e.
import AceEditor from 'react-ace';
import brace from 'brace';
Error:
Uncaught TypeError: Cannot read property 'acequire' of undefined
But, still it says the same old thing. How do I fix this? @mathisonian
PS: I even tried your example component as a substitute just to see if it works; but unfortunately it didn't! I hope you might be able to help soon. #187
I am getting this on V5.0.1. I've destroyed node_modules, cleared yarn cache, reinstalled modules with yarn, and still get this error. The _simplest_ hello world app will fail if I try to import AceEditor from 'react-ace' in the file.
@securingsincity What should I look for in trying to get this to work? Is this some sort compilation error with brace/react-ace?
I get the same error if I try to directly include the compiled JS file:import AceEditor from '../node_modules/react-ace/dist/react-ace.js'
Ran into the same issue. 'brace' rely on global variable (window.ace) and it will fail if there's already a window.ace variable on the page. Make sure you only import ace once.
Faced totally same issue while deploying it to production through create-react-app.
I mean that locally it works totally great but after deploying with CI - I see this error
ace.js:37 Uncaught TypeError: Cannot read property 'acequire' of undefined


"brace": "^0.11.1",
"react": "^16.4.0",
"react-ace": "^6.1.4",
"react-dom": "^16.4.0",
Any ideas how to fix it?
I've tried to build a production build in create-react-app locally and can reproduce the issue.
The window.ace is undefined after a successful build.
Am stuck on this :( did anyone resolve this?
Most helpful comment
Ran into the same issue. 'brace' rely on global variable (window.ace) and it will fail if there's already a window.ace variable on the page. Make sure you only import ace once.