Closed cookieY closed 6 years ago
i got this problem, and i want to know how to fix it ? @cookieY
me too
@longmajuxie u can try this
const ace = require('brace') let editor = ace.edit('javascript-editor')
@longmajuxie u can try this
const ace = require('brace') let editor = ace.edit('javascript-editor')
@longmajuxie u can try this
const ace = require('brace') let editor = ace.edit('javascript-editor')
no working. const ace = require('brace'); console.log('===', ace);
when i use console.log, display === undefined. but i can found brace in node_modules.
I had the same issue. For me, I had accidentally referenced ace.js from a script tag in my page.
var ace = require('brace'); require('brace/mode/javascript'); require('brace/theme/monokai');
var editor = ace.edit('javascript-editor'); editor.getSession().setMode('ace/mode/javascript'); editor.setTheme('ace/theme/monokai');
ERROR:
Error in mounted hook: "TypeError: Cannot read property 'edit' of undefined"