Reputation: 11570
We have an nrwl-nx workspace library project (on Angular 8), under which we have 3-4 angular libraries. Its ng serve works fine, ng build my-lib
used to work as well.
However, on our build agent, recently we started getting below error.
C:\pathToProject> my-workspace build:my-lib C:\pathToProject
C:\pathToProject> ng build --project my-libBuilding Angular Package
Building entry point '@my-scope/my-lib'
Rendering StylesheetsBUILD ERROR
[object Object] is not a PostCSS plugin
Error: [object Object] is not a PostCSS plugin
at Processor.normalize (C:\pathToProject\node_modules\ng-packagr\node_modules\postcss\lib\processor.js:145:15)
at new Processor (C:\pathToProject\node_modules\ng-packagr\node_modules\postcss\lib\processor.js:51:25)
at postcss (C:\pathToProject\node_modules\ng-packagr\node_modules\postcss\lib\postcss.js:73:10)
at createPostCssProcessor (C:\pathToProject\node_modules\ng-packagr\lib\ng-v5\entry-point\resources\stylesheet.transform.js:73:12)
at Object. (C:\pathToProject\node_modules\ng-packagr\lib\ng-v5\entry-point\resources\stylesheet.transform.js:36:30)
at Generator.next ()
at C:\pathToProject\node_modules\ng-packagr\lib\ng-v5\entry-point\resources\stylesheet.transform.js:7:71
at new Promise ()
at __awaiter (C:\pathToProject\node_modules\ng-packagr\lib\ng-v5\entry-point\resources\stylesheet.transform.js:3:12)
The same command worked fine on other machines until we cleared cache, reinstalled the same nodejs version and did ng build lib-project to troubleshoot. nodejs v10.16.0, npm v6.9.0.
I tried with nodejs v12.20.0
, but it seems like as issue comes with this version as well.
Checked other questions on SO as well
PostCSS error: [object Object] is not a PostCSS plugin, however, we are not using autoprefixer
.
Has anyone encountered the issue? Any help would be appreciated. __/\__
Upvotes: 5
Views: 2837