./node_modules/@fortawesome/fontawesome-svg-core/styles.css 中的 NPM 运行构建错误
./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/n ode_modules/postcss-loader/dist/cjs.js??ref--3-oneOf-1-2!./node_modules/@fortawesome/fontawesome-svg-core/styles.css) 模块构建失败(来自./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js): ParserError:语法错误,位于第 1 行、第 30 列 在 /home/simrs/adamklinik/frontend/node_modules/@fortawesome/fontawesome-svg-core/styles.css:200:3
我使用 nuxt.js 和 tailwind
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于任何遇到这个问题的人:我通过以下答案解决了它: https://stackoverflow.com/a/67827344/6098257< /a>
就我而言,我只需将 postcss-custom-properties 设置为 false。
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.尝试先执行
npm install
,然后使用npm run build
重新运行。Try to do
npm install
first, then rerun withnpm run build
.尝试执行以下步骤:
或者您可以手动更新两个包(@fortawesome/free-brands-svg-icons 和 @fortawesome/free-solid-svg-icons)到 v6.x
Try to do steps:
Or you can manual update two packages (@fortawesome/free-brands-svg-icons and @fortawesome/free-solid-svg-icons) to v6.x