简体   繁体   English

npm node react 和 tauri 的错误

[英]Errors with npm node react and tauri


ERROR in ./src/index.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/index.css)

Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Unexpected "(" found.
   at C:\Users\zahin\Documents\tauri-app\src\index.css:16:5
   at Root._error (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\parser.js:174:16)
   at Root.error (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\selectors\root.js:43:19)
   at Parser.error (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\parser.js:740:21)
   at Parser.attribute (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\parser.js:454:23)
   at Parser.parse (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\parser.js:1073:14)
   at Parser.loop (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\parser.js:1043:12)
   at new Parser (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\parser.js:164:10)
   at Processor._root (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\processor.js:53:18)
   at Processor._runSync (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\processor.js:100:21)
   at Processor.processSync (C:\Users\zahin\Documents\tauri-app\node_modules\postcss-selector-parser\dist\processor.js:197:23)

I'm getting a problem here idk how to fix it.我在这里遇到问题,不知道如何解决。 could anyone help?有人可以帮忙吗? I have been getting this error lately and not sure about how to fix idk but here's my css code:- here's my index.css code for a better context:- Please help me out, thanks.我最近遇到了这个错误,不确定如何修复 idk,但这是我的 css 代码:- 这是我的 index.css 代码以获得更好的上下文:- 请帮助我,谢谢。


@tailwind base;
@tailwind components;
@tailwind utilities;


@layer base {
  * {
    @apply m-0 p-0 ;
  }
  html {
    @apply text-xl;
  }
  body {
    @apply bg-[url('./img/bg.jpg')] bg-cover bg-no-repeat ;
  }
  header{
    @apply h-screen bg-cover bg-center;
  }
  ul{
    @apply float-right list-none mt-0.5 ;
  }
  ul li{
    @apply inline-block
  }
  ul li a{
    @apply text-white no-underline py-2.5 px-6 border border-solid border-transparent ease-in-out duration-300;  ;
  }
  ul li a:hover{
    @apply bg-white text-black;
  }
  ul li.active a{
    @apply bg-white text-black;
  }
}

okay seems like i found a solution.好吧,好像我找到了解决方案。 It seems tailwind wasn't taking the arbitrary way and i had to go to the tailwind.config.js and add the following line to theme>extend:似乎顺风没有采取任意方式,我不得不去tailwind.config.js并将以下行添加到主题>扩展:

theme: {
    extend: {
      backgroundImage: {
          'background': "linear-gradient(to right bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(./img/bg.jpg)",
      },
   },
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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