🐞 Bug report
What modules are related to this issue?
Is this a regression?
Yes, in version 11 I did not experience this bug.
Description
When adding an external stylesheet to either the index.html of a project, or dynamically via code, Angular Universal logs an error to the console. The error is just present in the output of the terminal running the project, not in the browser:
Unable to locate stylesheet: /home/user/sandbox/ext-css-repro/dist/ext-css-repro/browser/https:/cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css
In the browser everything seems fine. The styles from the file also load correctly.
🔬 Minimal Reproduction
ng new ext-css-repro
ng add @nguniversal/express-engine
add a link to an external stylesheet to the index.html. For example this:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
🔥 Exception or Error
Unable to locate stylesheet: /home/user/sandbox/ext-css-repro/dist/ext-css-repro/browser/https:/cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css
🌍 Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 12.0.2
Node: 14.15.5
Package Manager: npm 6.14.11
OS: linux x64
Angular: 12.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1200.2
@angular-devkit/build-angular 12.0.2
@angular-devkit/core 12.0.2
@angular-devkit/schematics 12.0.2
@nguniversal/builders 12.0.1
@nguniversal/express-engine 12.0.1
@schematics/angular 12.0.2
rxjs 6.6.7
typescript 4.2.4
🐞 Bug report
What modules are related to this issue?
Is this a regression?
Yes, in version 11 I did not experience this bug.
Description
When adding an external stylesheet to either the index.html of a project, or dynamically via code, Angular Universal logs an error to the console. The error is just present in the output of the terminal running the project, not in the browser:
Unable to locate stylesheet: /home/user/sandbox/ext-css-repro/dist/ext-css-repro/browser/https:/cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.cssIn the browser everything seems fine. The styles from the file also load correctly.
🔬 Minimal Reproduction
add a link to an external stylesheet to the index.html. For example this:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">🔥 Exception or Error
🌍 Your Environment