-
Notifications
You must be signed in to change notification settings - Fork 94
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
worker-html.js couldn't be loaded [Angular 6] #92
Comments
In example of Angular 6 application there are four warnings:
|
In example of Angular 6 application there are four warnings: Failed to load resource: the server responded with a status of 404 (Not Found) |
did anyone find a solution to this errors , i'm trying to integrate ace editor in my angular 6 application and i keep getting this 4 errors @hamfatfat talked about |
I managed to solve it by importing the script in "scripts": [
"node_modules/ace-builds/src-min/ace.js",
"node_modules/ace-builds/src-min/mode-json.js",
"node_modules/ace-builds/src-min/theme-eclipse.js",
{ "bundleName": "worker-json", "input": "node_modules/ace-builds/src-min/worker-json.js" }
] This way the bundle name of |
I think that @ori-sh close this issue - maybe this should be added into |
{ "bundleName": "worker-json", "input": "node_modules/ace-builds/src-min/worker-json.js" } - This does't work in production build. |
try this
|
Just : Thanks a lot ;-) |
I got the error as well bb0b9cd1-0baf-40dc-8825-9fc46a708cb9:1 Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:9000/worker-javascript.js' failed to load. But my issue is different. I am creating an How can I change the importScript to use assets/ui... path? |
I finally was able to make my code work. My setup is different. I build my Angular application and the it is served from my Play server. The angular build is stored in Play's /public/ui folder. The requests should be in format /assets/ui/.. which gets mapped to /public/ui/... due to a rule in Play routes file GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset) When I ran the code, I got error. Earlier, I also got error It seems The scripts section in "scripts": [ To include worker-.js files, I added this rule because it angular-cli can't load from node_modules. So I had to copy the files from node modules to root of my ui build - https://stackoverflow.com/questions/41555624/how-to-include-assets-from-node-modules-in-angular-cli-project "assets": [ When I executed the code, I found error that import * as ace from 'ace-builds/src-noconflict/ace'; In summary |
Hi, I'm tying to use Ace in my Angular 6 application, and have an error in console:
in
blob:http://localhost:4200/7b4eb2a2-2fe3-440c-aa09-b942beec5f0c:1
, I've found:It's interesting that the component looks like it's working.
Copying assets works somehow in angular-cli. I've tried to make a manual copy of this file (just for testing - angular-cli can't copy assets from
node_modules
directory), but it's not working properly. Maybe I'm doing something wrong.My options in
angular.json
:In
package.json
:Component code is just the default in documentation:
How can I get rid of this error in console?
Thanks.
The text was updated successfully, but these errors were encountered: