4

My Error Capture

ERROR in ./node_modules/@fortawesome/fontawesome-svg-core/styles.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/@fortawesome/fontawesome-svg-core/styles.css) Module build failed (from ./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js): ParserError: Syntax Error at line: 1, column 30 at /home/simrs/adamklinik/frontend/node_modules/@fortawesome/fontawesome-svg-core/styles.css:200:3

I use nuxt.js and tailwind

  • I have the same issue and same setup (nuxt.js with tailwind and vuetify). Did you find a solution? – Max Mar 12 '22 at 09:14

3 Answers3

5

For anyone who stumbles over this issue: I solved it by following this answer: https://stackoverflow.com/a/67827344/6098257

In my case I just had to set postcss-custom-properties to false.

build: {
    postcss: {
      plugins: {
        "postcss-custom-properties": false
      },
    },
  }
Max
  • 1,053
  • 1
  • 13
  • 34
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/31272201) – AArias Mar 12 '22 at 17:53
  • Thanks for the feedback. I changed my answer. The link is the direct link to the answer. Since we are in the stackoverflow cosmos this shouldn´t change. No need to vote down... – Max Mar 12 '22 at 17:57
0

Try to do npm install first, then rerun with npm run build.

Wildanzr
  • 1
  • 1
  • 4
0

Try to do steps:

  • npm uninstall @nuxtjs/fontawesome @fortawesome/free-solid-svg-icons @fortawesome/free-brands-svg-icons -D
  • npm i @nuxtjs/fontawesome @fortawesome/free-solid-svg-icons @fortawesome/free-brands-svg-icons -D

Or you can manual update two packages (@fortawesome/free-brands-svg-icons and @fortawesome/free-solid-svg-icons) to v6.x

Mr Brave
  • 11
  • 1