Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

AceEditor mode bug #68

Open
ColdFire87 opened this issue Oct 19, 2018 · 0 comments
Open

AceEditor mode bug #68

ColdFire87 opened this issue Oct 19, 2018 · 0 comments

Comments

@ColdFire87
Copy link

ColdFire87 commented Oct 19, 2018

Hi,

I'm using minikube and I've deployed kubeless-ui via the k8s.yml file.
I am getting the service url via minikube service -n kubeless ui --url which gives me http://192.168.99.100:30113.
I am using Chrome Version 69.0.3497.100 (Official Build) (64-bit) on Windows 7 x64.
The bug also occurs on Firefox 62.0.3 (64-bit) so I don't think it's a browser specific bug.

Something goes wrong in the editor react component and the editor does not have syntax highlighting.
The chain of events starts in src/components/Editor/Editor.js at line 145 in render(), where the mode is computed for the AceEditor 3rd party component.

-> render() -> runtimeToMode() -> RuntimeHelper.runtimeToLanguage() ->
-> await this.getAllRuntimes() -> ... start returning

Somewhere along the way this fails because a Promise is not handled properly. Because of that the
browser issues a request to http://192.168.99.100:30113/mode-[object%20Promise].js which
of course fails.

I think you need an async/await pair either in runtimeToMode() or render() or both :).

In let mode = this.runtimeToMode(), mode ends up to be a Promise object, not the resolved result.

I wanted to run the app locally but I'm on Windows and node-sass does not support it.

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

No branches or pull requests

1 participant