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

application unable to find mode-html.js #133

Open
manuchadha1979 opened this issue Feb 11, 2020 · 2 comments
Open

application unable to find mode-html.js #133

manuchadha1979 opened this issue Feb 11, 2020 · 2 comments

Comments

@manuchadha1979
Copy link

I have a Play application. The UI of the application is in Angular. I have created a folder ui which is the top level Angular directory.

build.sbt
`ui-dev-build` := {
    implicit val UIroot = baseDirectory.value / "ui"
      if (runDevBuild != Success) throw new Exception("Oops! UI Build crashed.")
}

def runDevBuild(implicit dir: File): Int = ifUiInstalled(runScript("npm run build"))

package.json
"build": "ng build --output-path ../public/ui",

When the Angular application is build, I transfer the output to the public folder of the Play framework. From there, Play transfers the contacts of the public folder to target folder for deployment. This works fine.

I want to use ng-ace2-editor in my application - https://github.com/fxmontigny/ng2-ace-editor. I have added it in package.json - "ng2-ace-editor": "0.3.9" and I can see that ng2-ace-editor directory is present in node_modules.

When I run the application, I get error

GET http://localhost:9000/mode-html.js net::ERR_ABORTED 404 (Not Found)
exports.loadScript	@	index.js:3802
exports.loadModule	@	index.js:4174
setMode	@	index.js:10152
push../node_modules/ng2-ace-editor/src/component.js.AceEditorComponent.setMode

I can't understand how to make my application find mode-html.js. The file is present at location "./node_modules/ace-builds/src-min/mode-html.js. I have added this path in "script":[] of package.json but I still get the error.

@RawatPraveen
Copy link

Have you ever found a solution for this?

@IhorBilobran
Copy link

You probably need to add node_modules/ace-builds/src-min/ace.js path to the script as it mentioned in the description

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

3 participants