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

v11.1 build still crashes sometimes when error in scss file #19892

Closed
14 tasks
rekna1 opened this issue Jan 28, 2021 · 1 comment · Fixed by #19899
Closed
14 tasks

v11.1 build still crashes sometimes when error in scss file #19892

rekna1 opened this issue Jan 28, 2021 · 1 comment · Fixed by #19899
Labels
area: ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Milestone

Comments

@rekna1
Copy link

rekna1 commented Jan 28, 2021

🐞 Bug report

Command (mark with an x)

  • new
  • [ x] build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

yes

Description

ng build --watch crashes when there is an error in de scss file e.g.
.test {
width:
}

🔬 Minimal Reproduction

in component stylesheet, type
.test {
width:
}

🔥 Exception or Error


Error: ./src/main.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Expected expression.
   ╷
85 │   width:
   │         ^
   ╵
  src\app\_____\____\___\___\____.component.scss 85:9  root stylesheet
    at ____\node_modules\webpack\lib\NormalModule.js:313:13
    at ____\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at ____\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (____\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at ____\node_modules\@ngtools\webpack\src\ivy\loader.js:57:9
    at runMicrotasks ()
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
 @ multi ./src/main.ts main[0]

🌍 Your Environment


Angular CLI: 11.1.0
Node: 12.19.0
OS: win32 x64

Angular: 11.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1101.0
@angular-devkit/build-angular   0.1101.0
@angular-devkit/core            11.1.0
@angular-devkit/schematics      11.1.0
@schematics/angular             11.1.0
@schematics/update              0.1101.0
rxjs                            6.6.3
typescript                      4.1.3

Anything else relevant?

@ngbot ngbot bot modified the milestone: needsTriage Jan 28, 2021
@alan-agius4 alan-agius4 added the freq1: low Only reported by a handful of users who observe it rarely label Jan 28, 2021
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jan 28, 2021
alan-agius4 added a commit that referenced this issue Feb 2, 2021
Webpack doesn't handle well expections and promise rejections. With this change we use the compilation errors.

Closes #19892

(cherry picked from commit e1efc35)
alan-agius4 added a commit that referenced this issue Feb 2, 2021
Webpack doesn't handle well expections and promise rejections. With this change we use the compilation errors.

Closes #19892
@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 Mar 5, 2021
ikjelle pushed a commit to ikjelle/angular-cli that referenced this issue Mar 26, 2024
Webpack doesn't handle well expections and promise rejections. With this change we use the compilation errors.

Closes angular#19892
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants