vue-plyr icon indicating copy to clipboard operation
vue-plyr copied to clipboard

Build error in vue-plyr.css when using @nuxt/postcss8

Open ateliershen opened this issue 3 years ago • 12 comments

Hi,

I am using Nuxt.js v2.15.4 and vue-plyr 7. It throws the following error when running the build command:

08:32:12.800 ERROR in ./node_modules/vue-plyr/dist/vue-plyr.css (./node_modules/@nuxt/postcss8/node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js??ref--3-oneOf-1-2!./node_modules/vue-plyr/dist/vue-plyr.css)
08:32:12.800 Module build failed (from ./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js):
08:32:12.800 ParserError: Syntax Error at line: 1, column 50
08:32:12.800 at node_modules/vue-plyr/dist/vue-plyr.css:1:2235

I am following the SSR instructions from the readme, using the exact same settings. Is anyone else encountering the same issue? Thanks.

ateliershen avatar Apr 20 '21 00:04 ateliershen

Same here

riderx avatar Apr 22 '21 03:04 riderx

With postcss v8.2.12 I receive the error

#22 33.41 ParserError: Syntax Error at line: 1, column 51
#22 33.41     at /srv/app/node_modules/plyr/dist/plyr.css:1:2198

See this build log

dargmuesli avatar Apr 23 '21 13:04 dargmuesli

I got the same error Module build failed (from ./node_modules/postcss-loader/src/index.js): friendly-errors 16:17:14 ParserError: Syntax Error at line: 1, column 51 at .....\node_modules\plyr\dist\plyr.css:1:2198 Nuxt 2.15.4 and last version. It works with plyr: 3.6.4

thks for the help

frederic117 avatar Apr 23 '21 14:04 frederic117

I'm experiencing the same problem. I tried rolling postcss back from 8.2.12 to 8.2.10, but the error remains.

elihorne avatar Apr 24 '21 22:04 elihorne

As an interim workaround, I've removed Plyr's css from my plugin file, and instead am pulling it from the unpkg CDN. It now successfully generates the build.

export default {
  head() {
    return {
      link: [
        {
          rel: 'stylesheet',
          href: 'https://unpkg.com/vue-plyr/dist/vue-plyr.css',
        },
      ],
    }
  },
}

elihorne avatar Apr 27 '21 15:04 elihorne

Same in my side, in plus vue-jlyr is really big so use cdn for the only page I use was a better solution

riderx avatar May 24 '21 18:05 riderx

Same issue here

saschaeggi avatar Jul 22 '21 14:07 saschaeggi

I also would love to see this issue fixed!

lustremedia avatar Sep 08 '21 18:09 lustremedia

I also get the error with postcss7 and vue-plyr, so I am wondering if postcss is really the culprit here...

lustremedia avatar Sep 27 '21 07:09 lustremedia

Still broken on my end.

unremarkablegarden avatar Oct 18 '21 17:10 unremarkablegarden

@unremarkablegarden the solution of @elihorne is working if you need a workaround

riderx avatar Oct 29 '21 14:10 riderx

Now that postcss-preset-env v7 is out, monitor https://github.com/nuxt/nuxt.js/pull/10060 and https://github.com/nuxt/nuxt.js/pull/9671. In the meantime you can add the following to your package.json:

  "resolutions": {
    "postcss-preset-env": "7.0.1"
  }

Please tell if that workaround works for you!

dargmuesli avatar Dec 05 '21 03:12 dargmuesli