Closed Manduro closed 7 years ago
Could be due to missing sourceMap: cssSourceMap,
in the options in object of the postcss-loader
in packages/@angular/cli/models/webpack-configs/styles.ts
(around line170).
Happy to create a PR.
@ouq77 Correct! PR submitted.
For me it ended up in misleading error, is it right?
⚠️ PostCSS Loader
Previous source map found, but options.sourceMap isn't set.
In this case the loader will discard the source map entirely for performance reasons.
See https://github.com/postcss/postcss-loader#sourcemap for more information.
NonErrorEmittedError: (Emitted value instead of an instance of Error)
⚠️ PostCSS Loader
Previous source map found, but options.sourceMap isn't set.
In this case the loader will discard the source map entirely for performance reasons.
See https://github.com/postcss/postcss-loader#sourcemap for more information.
at Object.emitWarning (C:\Users\asahi\AspNetCoreSpa\ClientApp\node_modules\webpack\lib\NormalModule.js:117:16)
at Promise.resolve.then.then (C:\Users\asahi\AspNetCoreSpa\ClientApp\node_modules\postcss-loader\lib\index.js:136:12)
at <anonymous>
@ multi ./src/styles.scss ./node_modules/bootstrap/scss/bootstrap.scss ./node_modules/font-awesome/scss/font-awesome.scss
WARNING in ./node_modules/bootstrap/scss/bootstrap.scss
(Emitted value instead of an instance of Error)
⚠️ PostCSS Loader
Previous source map found, but options.sourceMap isn't set.
In this case the loader will discard the source map entirely for performance reasons.
See https://github.com/postcss/postcss-loader#sourcemap for more information.
NonErrorEmittedError: (Emitted value instead of an instance of Error)
⚠️ PostCSS Loader
Previous source map found, but options.sourceMap isn't set.
In this case the loader will discard the source map entirely for performance reasons.
See https://github.com/postcss/postcss-loader#sourcemap for more information.
at Object.emitWarning (C:\Users\asahi\AspNetCoreSpa\ClientApp\node_modules\webpack\lib\NormalModule.js:117:16)
at Promise.resolve.then.then (C:\Users\asahi\AspNetCoreSpa\ClientApp\node_modules\postcss-loader\lib\index.js:136:12)
at <anonymous>
@ multi ./src/styles.scss ./node_modules/bootstrap/scss/bootstrap.scss ./node_modules/font-awesome/scss/font-awesome.scss
ERROR in ./src/main.ts
Module build failed: Error: Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
at Object.ngcLoader (C:\Users\asahi\AspNetCoreSpa\ClientApp\node_modules\@ngtools\webpack\src\loader.js:458:19)
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
ERROR in ./src/polyfills.ts
Module build failed: Error: Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
at Object.ngcLoader (C:\Users\asahi\AspNetCoreSpa\ClientApp\node_modules\@ngtools\webpack\src\loader.js:458:19)
@ multi ./src/polyfills.ts
webpack: Failed to compile.
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.
Versions
Repro steps
ng build -prod --sourcemaps
Observed behavior
Desired behavior
Resolved warning 😄