简体   繁体   中英

NPM RUN BUILD ERROR in ./node_modules/@fortawesome/fontawesome-svg-core/styles.css

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

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
      },
    },
  }

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM