smnbbrv / ngx-plyr

Angular 6+ binding for Plyr video & audio player
https://smnbbrv.github.io/ngx-plyr/
MIT License
100 stars 65 forks source link

Problem with PostCSS #88

Closed amallecourt closed 3 years ago

amallecourt commented 3 years ago

Hello,

After installing ngx-plyr and plyr with npm, I encoutered an angular compilation error when I reference the css file as documented : node_modules/plyr/dist/plyr.css

The error is :

./node_modules/plyr/dist/plyr.css - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): ParserError: Syntax Error at line: 1, column 51 at /Users/tf1/Documents/xxxxxx/angular/node_modules/plyr/dist/plyr.css:1:2198 at Parser.error (/Users/tf1/Documents/xxxxxx//angular/node_modules/postcss-values-parser/lib/parser.js:127:11) ........

I also have to precise I have a warning during the angular browser application bundles generation : 'Unknown error from PostCSS plugin. Your current PostCSS version is 8.3.0, but postcss-preset-env uses 7.0.36. Perhaps this is the source of the error below.'

I am using Angular 12.0.4

I am not familiar with PostCSS, what do you think is the best way to deal with what seems to be a version problem ?

amallecourt commented 3 years ago

The problem seem to be link to plyr and not ngx-plyr. I resolved the issue by downgrading plyr as talked here : https://github.com/sampotts/plyr/issues/2182#issuecomment-833676995

george-i commented 2 years ago

I solved it by loading in angular.json node_modules/plyr/src/sass/plyr.scss Note its extension. @smnbbrv