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

Error when initializing ace-editor #1

Open
keremcankabadayi opened this issue May 2, 2020 · 5 comments
Open

Error when initializing ace-editor #1

keremcankabadayi opened this issue May 2, 2020 · 5 comments

Comments

@keremcankabadayi
Copy link

keremcankabadayi commented May 2, 2020

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)

image

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?

@giscafer
Copy link
Owner

giscafer commented May 2, 2020

@keremcankabadayi
Copy link
Author

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';

@keremcankabadayi
Copy link
Author

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

@giscafer
Copy link
Owner

giscafer commented May 2, 2020

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 = $event;

this.acEditor.$blockScrolling = Infinity

@giscafer
Copy link
Owner

giscafer commented May 2, 2020

@keremcankabadayi

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?

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

2 participants