Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error for v3.0.9 #628

Closed
charan0017 opened this issue Aug 26, 2021 · 9 comments
Closed

Build Error for v3.0.9 #628

charan0017 opened this issue Aug 26, 2021 · 9 comments

Comments

@charan0017
Copy link

charan0017 commented Aug 26, 2021

I just updated plyr-react package from 3.0.8 to 3.0.9 and tried to re-build my react project.
It just failed with the following error message!

Failed to compile.

./node_modules/plyr-react/dist/plyr.css
ParserError: Syntax Error at line: 1, column 51

error Command failed with exit code 1.

error img: https://i.imgur.com/7KdrPGn.png
my node.js version is v14.17.5

@chintan9
Copy link
Owner

chintan9 commented Aug 26, 2021

@charan0017 Can you create stackbltz.com for sample ?

It worked for me.

https://stackblitz.com/edit/react-vgfce6?file=src/App.js

@chintan9
Copy link
Owner

chintan9 commented Aug 26, 2021

@charan0017 please use v3.0.8 for while you can update your db

npx browserslist@latest --update-db

@pabacham
Copy link

pabacham commented Sep 3, 2021

I experience the same issue with 3.1.0

@chintan9
Copy link
Owner

chintan9 commented Sep 16, 2021

Can try with v3.2.0?

@charan0017
Copy link
Author

Can try with v3.2.0?

I just installed v3.2.0. But, still getting the same error!

image

@realamirhe
Copy link
Collaborator

@charan0017, The issue appears to be caused by postcss-custom-properties processing an already minified plyr.css file.

By adding the following to your package, you can utilize yarn resolutions for react-scripts to use the same version.

"resolutions": {
    "postcss-custom-properties": "^11.0.0"
  },

for a more detailed explanation, you can see this answer and this csstools issue

@charan0017
Copy link
Author

@charan0017, The issue appears to be caused by postcss-custom-properties processing an already minified plyr.css file.

By adding the following to your package, you can utilize yarn resolutions for react-scripts to use the same version.

"resolutions": {
    "postcss-custom-properties": "^11.0.0"
  },

for a more detailed explanation, you can see this answer and this csstools issue

Wow, It just worked like Charm! Thanks. 😃

@lukaszrzasa
Copy link

not working with pnpm

@chintan9 chintan9 reopened this Sep 20, 2021
@lukaszrzasa
Copy link

lukaszrzasa commented Sep 22, 2021

pnpm steps:

  • copy css code from ./node_modules/plyr-react/dist/plyr.css
  • use css unminify tool ( https://unminify.com/ for example)
  • create _plyr.scss file in any project location
  • paste unminified code
  • import your _plyr.scss file instead of original .css file
  • done, all works!

// probably unminifier is not required - not tested :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants