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

Source map error with RC version update #19236

Closed
2 tasks done
JSmithOner opened this issue Oct 27, 2020 · 4 comments · Fixed by #19296
Closed
2 tasks done

Source map error with RC version update #19236

JSmithOner opened this issue Oct 27, 2020 · 4 comments · Fixed by #19296

Comments

@JSmithOner
Copy link

JSmithOner commented Oct 27, 2020

🐞 Bug report

Command (mark with an x)

  • serve
  • update

Is this a regression?

Yes

Description

A clear and concise description of the problem...

when connecting to http://localhost:4200 after ng serve I get a blank screen page and an error

🔬 Minimal Reproduction

Maybe not the best idea I had but I've runned the following command
all of the following packages where on 8 version

ng update @angular/cdk @angular/cli @angular/core @angular/material rxjs --allowDirty --next --force

now my angular.json looks like that:

  "dependencies": {
    "@angular/animations": "^11.0.0-rc.0",
    "@angular/cdk": "^11.0.0-rc.0",
    "@angular/common": "^11.0.0-rc.0",
    "@angular/compiler": "^11.0.0-rc.0",
    "@angular/core": "^11.0.0-rc.0",
    "@angular/fire": "^6.0.2",
    "@angular/forms": "^11.0.0-rc.0",
    "@angular/material": "^11.0.0-rc.0",
    "@angular/platform-browser": "^11.0.0-rc.0",
    "@angular/platform-browser-dynamic": "^11.0.0-rc.0",
    "@angular/router": "^11.0.0-rc.0",
    "@types/fabric": "^3.0.0",
    "bootstrap": "^4.3.1",
    "color": "^3.1.2",
    "core-js": "^2.5.4",
    "fabric": "^3.3.2",
    "fabric-with-gestures": "^4.0.0-rc.1",
    "firebase": "^7.19.1",
    "jquery": "^1.9.1",
    "popper.js": "^1.14.7",
    "rxjs": "^7.0.0-beta.8",
    "tslib": "^1.9.0",
    "zone.js": "^0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.1100.0-rc.0",
    "@angular/cli": "~11.0.0-rc.0",
    "@angular/compiler-cli": "~11.0.0-rc.0",
    "@angular/language-service": "~11.0.0-rc.0",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/jquery": "^3.3.31",
    "@types/node": "^8.9.5",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~5.2.3",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~7.0.0",
    "ts-node": "~7.0.0",
    "tslib": "^1.9.0",
    "tslint": "~6.1.3",
    "typescript": "~4.0.5"
  }

🔥 Exception or Error

  
    Error: request failed with status 404
    ressource URL: http://localhost:4200/vendor.js
    URL source link: startWith.js.map
  

🌍 Your Environment


Angular CLI: 11.0.0-rc.0
Node: 14.5.0
OS: darwin x64

Angular: 11.0.0-rc.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.0-rc.0
@angular-devkit/build-angular   0.1100.0-rc.0
@angular-devkit/core            11.0.0-rc.0
@angular-devkit/schematics      11.0.0-rc.0
@angular/fire                   6.0.2
@schematics/angular             11.0.0-rc.0
@schematics/update              0.1100.0-rc.0
rxjs                            7.0.0-beta.8
typescript                      4.0.5

Anything else relevant?

The error message used to show on Chrome but the one I gave you is a translation of Firefox and don't show on Chrome anymore.
Firefox 82.0.1
Chrome 86.0.4240.111

@alan-agius4 alan-agius4 added needs: repro steps We cannot reproduce the issue with the information given area: devkit/build-angular devkit/build-angular:dev-server freq3: high severity2: inconvenient type: bug/fix and removed needs: repro steps We cannot reproduce the issue with the information given labels Oct 28, 2020
@ngbot ngbot bot modified the milestone: Backlog Nov 2, 2020
@alan-agius4
Copy link
Collaborator

In a nutshell what is happening here is that.

In version 11, we no longer process vendor sourcemaps unless the vendor option is enabled which improves build time, ~3 seconds on an ng new application. The drawback of this that //# sourceMappingURL comment is not removed from the source file of the libraries. Hence, a warning will be issued in the console because the sourcemap cannot be loaded.

@JSmithOner
Copy link
Author

JSmithOner commented Nov 2, 2020

@alan-agius4 Sorry I din't gave you an example but the project is quite big and I assumed I gave you sufficient infos to reproduce the basic case (which is updating an existing project) as when I downgraded back to the latest 10th version of angular everything went back to normal. Thanks again for your time

@alan-agius4
Copy link
Collaborator

@JSmithOner, I was able to replicate the reported issue.

@alan-agius4 alan-agius4 self-assigned this Nov 2, 2020
filipesilva pushed a commit that referenced this issue Nov 3, 2020
….map` when vendor sourcemaps is disabled"

This reverts commit b17763b.

Closes #19236
filipesilva pushed a commit that referenced this issue Nov 3, 2020
….map` when vendor sourcemaps is disabled"

This reverts commit b17763b.

Closes #19236
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.