问题
Recently upgraded from Angular 6 to Angular 11 using https://update.angular.io. Everything went smooth and Angular runs locally using ng serve
but when trying to build a production-build using ng serve --prod
it gives just following error:
Error: Expected a pseudo-class or pseudo-element.
When using ng build --prod --verbose=true
, it results in lot of logs similar to:
WARNING in Conflict: Multiple assets emit different content to the same filename 3rdpartylicenses.txt
WARNING in Conflict: Multiple assets emit different content to the same filename 3rdpartylicenses.txt
ERROR in Expected a pseudo-class or pseudo-element.
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--12-1!node_modules/postcss-loader/dist/cjs.js??ref--12-2!node_modules/@angular/material/prebuilt-themes/indigo-pink.css:
Asset Size Chunks Chunk Names
3rdpartylicenses.txt 42.5 KiB
Entrypoint mini-css-extract-plugin = *
chunk {0} * (mini-css-extract-plugin) 73 KiB [entry] [rendered]
[24IM] ./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/postcss-loader/dist/cjs.js??ref--12-2!./node_modules/@angular/material/prebuilt-themes/indigo-pink.css 70.5 KiB {0} [built]
ModuleConcatenation bailout: Module uses module.id
single entry !!/Users/ronak/Documents/Pistis/pistis-web/node_modules/css-loader/dist/cjs.js??ref--12-1!/Users/ronak/Documents/Pistis/pistis-web/node_modules/postcss-loader/dist/cjs.js??ref--12-2!/Users/ronak/Documents/Pistis/pistis-web/node_modules/@angular/material/prebuilt-themes/indigo-pink.css mini-css-extract-plugin
[JPst] ./node_modules/css-loader/dist/runtime/api.js 2.46 KiB {0} [built]
[only some exports used: default]
ModuleConcatenation bailout: Module is not an ECMAScript module
harmony side effect evaluation ../../../css-loader/dist/runtime/api.js [24IM] ./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/postcss-loader/dist/cjs.js??ref--12-2!./node_modules/@angular/material/prebuilt-themes/indigo-pink.css 2:0-82
harmony import specifier ../../../css-loader/dist/runtime/api.js [24IM] ./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/postcss-loader/dist/cjs.js??ref--12-2!./node_modules/@angular/material/prebuilt-themes/indigo-pink.css 3:30-57
LOG from webpack.buildChunkGraph.visitModules
<t> prepare: 0.013822ms
<t> visiting: 0.013708ms
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--12-1!node_modules/postcss-loader/dist/cjs.js??ref--12-2!node_modules/@nebular/theme/styles/prebuilt/default.css:
Asset Size Chunks Chunk Names
3rdpartylicenses.txt 43.6 KiB
Entrypoint mini-css-extract-plugin = *
chunk {0} * (mini-css-extract-plugin) 220 KiB [entry] [rendered]
[Hvlo] ./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/postcss-loader/dist/cjs.js??ref--12-2!./node_modules/@nebular/theme/styles/prebuilt/default.css 217 KiB {0} [built]
ModuleConcatenation bailout: Module uses module.id
single entry !!/Users/ronak/Documents/Pistis/pistis-web/node_modules/css-loader/dist/cjs.js??ref--12-1!/Users/ronak/Documents/Pistis/pistis-web/node_modules/postcss-loader/dist/cjs.js??ref--12-2!/Users/ronak/Documents/Pistis/pistis-web/node_modules/@nebular/theme/styles/prebuilt/default.css mini-css-extract-plugin
[JPst] ./node_modules/css-loader/dist/runtime/api.js 2.46 KiB {0} [built]
[only some exports used: default]
ModuleConcatenation bailout: Module is not an ECMAScript module
harmony side effect evaluation ../../../../css-loader/dist/runtime/api.js [Hvlo] ./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/postcss-loader/dist/cjs.js??ref--12-2!./node_modules/@nebular/theme/styles/prebuilt/default.css 2:0-85
harmony import specifier ../../../../css-loader/dist/runtime/api.js [Hvlo] ./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/postcss-loader/dist/cjs.js??ref--12-2!./node_modules/@nebular/theme/styles/prebuilt/default.css 3:30-57
LOG from webpack.buildChunkGraph.visitModules
<t> prepare: 0.014615ms
<t> visiting: 0.011623ms
Angular version: 11 and Node version: 12.16.3
来源:https://stackoverflow.com/questions/65183286/angular-11-production-build-error-expected-a-pseudo-class-or-pseudo-element