You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, the previous version in which this bug was not present was: 8.0.0
Description
Whenever there's an error in a scss-file connected to a component, childCompilation becomes undefined and hence can't be destructed. err is provided. So I guess you just need handle the empty childCompilation case.
UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `warnings` of 'undefined' or 'null'.
at childCompiler.compile (C:\Users\jway52\repo\angular-devkit-bug\node_modules\@ngtools\webpack\src\resource_loader.js:81:46)
at compilation.seal.err (C:\Users\jway52\repo\angular-devkit-bug\node_modules\webpack\lib\Compiler.js:666:23)
at hooks.additionalAssets.callAsync.err (C:\Users\jway52\repo\angular-devkit-bug\node_modules\webpack\lib\Compilation.js:1369:13)
at _err0 (eval at create (C:\Users\jway52\repo\angular-devkit-bug\node_modules\tapable\lib\HookCodeFactory.js:33:10), :9:1)
at _evaluate.then.catch.err (C:\Users\jway52\repo\angular-devkit-bug\node_modules\@ngtools\webpack\src\resource_loader.js:70:39)
at process._tickCallback (internal/process/next_tick.js:68:7)
@JonWallsten do you know what in scss files might cause this issue? i only get this error when i try to build for angular universal 'npm run build:ssr'
@JonWallsten do you know what in scss files might cause this issue? i only get this error when i try to build for angular universal 'npm run build:ssr'
@pouyaz123: Unfortunately it can be anything that the linter doesn't pick up. In my case it was : instead of ; and then multiple dots before the class.
The easiest way to check is to edit this file: node_modules/@ngtools/webpack/src/resource_loader.js and add the following code on the line before the error occurs:
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: 8.0.0Description
Whenever there's an error in a scss-file connected to a component, childCompilation becomes
undefined
and hence can't be destructed. err is provided. So I guess you just need handle the empty childCompilation case.🔬 Minimal Reproduction
https://github.com/JonWallsten/angular-bug
Step 1: npm i
Step 2: npm run build
Step 3: ...
Step 4: Profit!
🔥 Exception or Error
🌍 Your Environment
The text was updated successfully, but these errors were encountered: