Skip to content
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 read property 'acequire' of undefined #141

Closed
mathisonian opened this issue Oct 5, 2016 · 14 comments
Closed

Cannot read property 'acequire' of undefined #141

mathisonian opened this issue Oct 5, 2016 · 14 comments

Comments

@mathisonian
Copy link

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

screen shot 2016-10-05 at 1 06 04 pm

screen shot 2016-10-05 at 1 06 09 pm

@mathisonian
Copy link
Author

mathisonian commented Oct 5, 2016

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 ¯_(ツ)_/¯

@avizaviz
Copy link

avizaviz commented Oct 7, 2016

happens to me too, no simple way to resolve it?

@AriTheElk
Copy link

+1

@darlingtld
Copy link

I bumped into the same issue. Got no idea how to fix this.

@MVMS1994
Copy link

MVMS1994 commented Nov 7, 2016

+1

@mathisonian
Copy link
Author

re-opening since it seems others are having the same issue

@mathisonian mathisonian reopened this Nov 7, 2016
@securingsincity
Copy link
Owner

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

@nicholasareed
Copy link

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

@callmeaatrey
Copy link

callmeaatrey commented Apr 11, 2017

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

@jefflewis
Copy link

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'

@missing1984
Copy link

missing1984 commented Jan 24, 2018

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.

@m1n0s
Copy link

m1n0s commented Jul 20, 2018

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
image
image

"brace": "^0.11.1",
"react": "^16.4.0",
"react-ace": "^6.1.4",
"react-dom": "^16.4.0",

Any ideas how to fix it?

@m1n0s
Copy link

m1n0s commented Jul 23, 2018

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.

@pdubey84
Copy link

Am stuck on this :( did anyone resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests