question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS processing errors are silent, hidden the issue from the user

See original GitHub issue

Type of Issue

[X] Bug Report
[ ] Feature Request

Description

When processing CSS, SCSS etc, if there is an error, it is not displayed to the user.

https://github.com/ng-packagr/ng-packagr/blob/c2efc42591ea8f2581cb7c8d3ea16a6b9cfa526e/src/lib/styles/stylesheet-processor.ts#L71

For example, I had an invalid browser-list configuration. The real error was Unknown version 88 of edge

However, in the console I got:

✖ Compiling TypeScript sources through NGC
ERROR: my-component.component.ts:59:16 - error NG2008: Could not find stylesheet file 'my-component.component.scss'.

59   styleUrls: [ 'my-component.component.scss' ],
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

my-component.component.ts:59:16 - error NG2008: Could not find stylesheet file 'my-component.component.scss'.

59   styleUrls: [ 'my-component.component.scss' ],
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The does not provide proper information, and is misleading since the SCSS file is there… which is confusing.

Expected Behaviour

Proper error shown

Version Information

ng-packagr:            12.0.0
@angular/compiler:     12.0.0
rollup:                2.48.0
typescript:            4.2.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
Bartoszkolodziejczakcommented, May 21, 2021

I have similar issue. Temporary workaround is downgrade ng-packagr

0reactions
github-actions[bot]commented, Jun 25, 2021

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

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parse css and remove rules which are giving error
I am using sabberworm css parser and this kind of rules gave me fatal error I am updating my question for better explanation....
Read more >
How to Use Warnings and Errors in Sass Effectively - SitePoint
Now we're going to look at warnings and errors. Both form a one-way communication system between the program (in this case, Sass) and...
Read more >
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
Handling common HTML and CSS problems - MDN Web Docs
Basically, it is a matter of checking whether your HTML and CSS code is well formed and doesn't contain any syntax errors.
Read more >
MiniCssExtractPlugin - webpack
Compared to the extract-text-webpack-plugin: Async loading; No duplicate compilation (performance); Easier to use; Specific to CSS ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found