scripts.bundle.js net::ERR_ABORTED
Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
Angular CLI: 1.5.0 Node: 8.8.0 OS: darwin x64 Angular: 5.0.0 ... animations, common, compiler, compiler-cli, core, forms ... http, platform-browser, platform-browser-dynamic ... platform-server, router
@angular/cli: 1.5.0 @angular/language-service: 4.4.4 @angular-devkit/build-optimizer: 0.0.32 @angular-devkit/core: 0.0.20 @angular-devkit/schematics: 0.0.35 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.8.0 @schematics/angular: 0.1.0 typescript: 2.4.2 webpack: 3.8.1
Repro steps.
When I run 'ng serve --aot` it gives me this error: GET http://localhost:4200/scripts.bundle.js net::ERR_ABORTED
and because I have included jquery it has problem referencing it. ERROR ReferenceError: $ is not defined
I checked Network on Dev tools and scripts.bundle.js is NOT FOUND
The log given by the failure.
Desired functionality.
Today I upgraded the project to angular@5 and [email protected] . Prior to this, it did not happen.
Mention any other details that might be useful.
same here. I am also facing the same
the workaround is NOT using aot just ng serve
Same here. I did not use AOT on serve.
same here with angular 5, cli 1.5
For me, the error only appears in the following situation:
Using ng serve with no flags
The first compilation fails (due to a compile error)
Subsequent build passes (compile error fixed)
==> the scripts.bundle.js file is not generated.
When I abort the ng serve command and restart it, the file is generated as expected.
Node: 6.11.2 Npm: 5.5.1 Typescript: 2.3.4 @angular/cli: 1.5.0 (also occurred in 1.4.9)
I get the same issue even when I use ng serve. Just upgraded project from angular 4.3.2 to 5.0.0 and cli 1.5
I had the same issue. Running npm cache clean seems to have resolved it.
I have the same issue GET http://localhost:4200/scripts.bundle.js net::ERR_ABORTED
I got the same error updating angular 4 to 5 and cli 1.4.7 to 1.5
I fixed it running:
npm cache verify
I hope that will solve your problem too.
Same here.
- angular: 5.0.1
- @angular/cli: 1.5.0,
- typescript: 2.6.1
- npm: 5.5.1
- node: 6.9.5
Double check to see if the path to the script dependency has changed. This was the problem I ran into... After updating to the correct path, everything worked.
Thanks, a typo in .js file created that issue, and after its correction, compiled fine. Regards, Selva
From: Dale Dixon <[email protected]>
To: angular/angular-cli [email protected] Cc: SelvaNg [email protected]; Comment [email protected] Sent: Wednesday, November 15, 2017 2:32 PM Subject: Re: [angular/angular-cli] scripts.bundle.js net::ERR_ABORTED (#8371)
Double check to see if the path to the script dependency has changed. This was the problem I ran into... After updating to the correct path, everything worked.— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Just to increase the number of times this solution appears:
It looks to be an issue with caching. Run:
npm cache clean or npm cache verify.
That has solved it for me.
None of
npm cache clean or npm cache verify
doesn't solve the issue for me.
Still have only 5 chunks generated ex:
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 7.73 MB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 1.75 MB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 1.06 MB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 13.8 MB [initial] [rendered]
Same problem...
Same problem.
same issue with "@angular/cli": "1.5.0",
Same problem fixed by update [email protected],but still error with error TS5055 when run ng build --prod and ng build --aot.
resolved by updating angular cli to "@angular/cli": "1.5.4"
Nice, I'll update it...