Error when initializing ace-editor
keremcankabadayi opened this issue · comments
Hi there, I have some error issue but nothing affects it.
Here my code:
<div
id="eca-editor"
ace-editor
[text]="bodyInput"
[mode]="mode"
[theme]="theme"
[options]="options"
[readOnly]="false"
(textChanged)="onBodyChange($event)"
></div>
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/alertifyjs/build/alertify.min.js",
"node_modules/ace-builds/src-min/ace.js",
"node_modules/ace-builds/src-min/theme-monokai.js",
"node_modules/ace-builds/src-min/mode-javascript.js",
"node_modules/ace-builds/src-min/mode-json.js",
{ "bundleName": "worker-json", "input": "node_modules/ace-builds/src-min/worker-json.js" }
]
Unable to infer path to ace from script src, use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes or with webpack use ace/webpack-resolver
ace.js:1 GET http://localhost:4200/ext-tern.js net::ERR_ABORTED 404 (Not Found)
I checked my node_modules folter to load this script but i didnt found like ext-tern.js
Any idea how to avoid this error?
@keremcankabadayi trying use brace
instead ? see: https://github.com/giscafer/ledge/blob/c139b889af63c213d62a1a320becd1f751ff6faa/src/app/presentation/ledge-helper/ledge-helper.component.ts#L8
This page is use the ngx-ace-tern
https://devops.phodal.com/helper
I got rid of the error,
Unable to infer path to ace from script src, use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes or with webpack use ace/webpack-resolver
but I'm still getting this error,
index.js:3802 GET http://localhost:4200/ext-tern.js net::ERR_ABORTED 404 (Not Found)
I added like this,
import 'brace/index';
import 'brace/theme/monokai';
import 'brace/mode/json';
And also below warning came up. Here is solution of this. How can i fix it?
Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
And also below warning came up. Here is solution of this. How can i fix it?
Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
try get the editorRef by (editorRef)="editorRef($event)"
this.acEditor.$blockScrolling = Infinity
index.js:3802 GET http://localhost:4200/ext-tern.js net::ERR_ABORTED 404 (Not Found)
Can you reproduce this error by giving a demo on codesandbox or stackblitz?