angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

scripts.bundle.js net::ERR_ABORTED

Open ylligashi opened this issue 9 years ago • 40 comments

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.

ylligashi avatar Nov 06 '17 13:11 ylligashi

same here. I am also facing the same

Debananda avatar Nov 06 '17 15:11 Debananda

the workaround is NOT using aot just ng serve

ylligashi avatar Nov 06 '17 15:11 ylligashi

Same here. I did not use AOT on serve.

felipefialho avatar Nov 07 '17 13:11 felipefialho

same here with angular 5, cli 1.5

khanhvu161188 avatar Nov 09 '17 14:11 khanhvu161188

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)

orjandesmet avatar Nov 10 '17 08:11 orjandesmet

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

jtoplak avatar Nov 12 '17 22:11 jtoplak

I had the same issue. Running npm cache clean seems to have resolved it.

JSetti avatar Nov 14 '17 23:11 JSetti

I have the same issue GET http://localhost:4200/scripts.bundle.js net::ERR_ABORTED

SelvaNg avatar Nov 15 '17 04:11 SelvaNg

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.

superdioz avatar Nov 15 '17 12:11 superdioz

Same here.

  • angular: 5.0.1
  • @angular/cli: 1.5.0,
  • typescript: 2.6.1
  • npm: 5.5.1
  • node: 6.9.5

lvidal1 avatar Nov 15 '17 16:11 lvidal1

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.

dale-dixon avatar Nov 15 '17 19:11 dale-dixon

 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.

SelvaNg avatar Nov 16 '17 02:11 SelvaNg

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.

eavestn avatar Nov 20 '17 17:11 eavestn

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]

qvidmi avatar Nov 21 '17 11:11 qvidmi

Same problem...

bastienlemaitre avatar Nov 21 '17 13:11 bastienlemaitre

Same problem.

dattapw avatar Nov 25 '17 04:11 dattapw

same issue with "@angular/cli": "1.5.0",

alamgirqazi avatar Nov 27 '17 04:11 alamgirqazi

Same problem fixed by update [email protected],but still error with error TS5055 when run ng build --prod and ng build --aot.

Howard-Song avatar Nov 27 '17 07:11 Howard-Song

resolved by updating angular cli to "@angular/cli": "1.5.4"

alamgirqazi avatar Nov 27 '17 07:11 alamgirqazi

Nice, I'll update it...

felipefialho avatar Nov 27 '17 13:11 felipefialho