Skip to content

scripts.bundle.js net::ERR_ABORTED #8371

Closed

Description

@ylligashi

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 angular-cli@1.5 .
Prior to this, it did not happen.

Mention any other details that might be useful.

Activity

  1. Debananda commented on Nov 6, 2017

    @Debananda

    same here. I am also facing the same

  2. ylligashi commented on Nov 6, 2017

    @ylligashi
    Author

    the workaround is NOT using aot just ng serve

  3. felipefialho commented on Nov 7, 2017

    @felipefialho

    Same here. I did not use AOT on serve.

  4. khanhvu161188 commented on Nov 9, 2017

    @khanhvu161188

    same here with angular 5, cli 1.5

  5. orjandesmet commented on Nov 10, 2017

    @orjandesmet

    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)

  6. jtoplak commented on Nov 12, 2017

    @jtoplak

    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

  7. added
    P1
    on Nov 14, 2017
  8. JSetti commented on Nov 14, 2017

    @JSetti

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

  9. SelvaNg commented on Nov 15, 2017

    @SelvaNg

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

  10. superdioz commented on Nov 15, 2017

    @superdioz

    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.

  11. lvidal1 commented on Nov 15, 2017

    @lvidal1

    Same here.

    • angular: 5.0.1
    • @angular/cli: 1.5.0,
    • typescript: 2.6.1
    • npm: 5.5.1
    • node: 6.9.5
  12. dale-dixon commented on Nov 15, 2017

    @dale-dixon

    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.

  13. SelvaNg commented on Nov 16, 2017

    @SelvaNg
  14. 27 remaining items

  15. jcuervas commented on Feb 3, 2018

    @jcuervas

    I was facing the same issue, solved by changing base href="/" to "./" in index.html after build

  16. sebamed commented on Feb 6, 2018

    @sebamed

    If you are uploading this to github pages:
    change "/" to "./" in any sheet or script tags in your built index.html and upload it like that

  17. EmanuelCarneiro commented on Feb 7, 2018

    @EmanuelCarneiro

    confirm this was fixed after upgrading the CLI from 1.5.0 to 1.6.7

  18. clydin commented on Feb 7, 2018

    @clydin
    Member

    Closing as resolved with the 1.6.7+. If the issue persists, please open a new issue detailing the problem.

  19. duyngha commented on Feb 23, 2018

    @duyngha

    I used both npm cache verify and npm cache clean and even restart angular cli. Sometime it works, sometimes it doesn't work. It's so weird to me. I still don't know what exactly reason here. Any beyond workarounds for this issue?

  20. Vaibhav2812 commented on Apr 25, 2018

    @Vaibhav2812

    npm cache verify work for me.

    Thanks

  21. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  22. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1needs: repro stepsseverity3: broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions