React项目中的一个sass文件显示了一个错误,我不知道它来自哪里

时间:2019-07-19 12:35:19

标签: reactjs sass

sass文件显示错误,我不知道它来自哪里。

错误日志:

C:\Users\Mehdy\Desktop\ForumReact\src\theme\node-content-renderer.scss:184:26: 6.5 is not an int.
    ╷
184 │   @for $i from 1 through (($point-count + 1) / 2) {
    │                          ^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
  stdin 184:26  root stylesheet
Error: 6.5 is not an int.
    ╷
184 │   @for $i from 1 through (($point-count + 1) / 2) {
    │                          ^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
  stdin 184:26  root stylesheet
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-app-template@1.0.0 build: `parcel build src/index.html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-app-template@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

以及文件(rendere.scss)中导致错误的部分:

@for $i from 1 through (($point-count + 1) / 2) {
    &:nth-of-type(#{$i}) {
      transform: rotate(360deg / $point-count * ($i - 1));
    }

    &:nth-of-type(#{$i + $point-count / 2}) {
      transform: rotate(180deg + 360deg / $point-count * ($i - 1));
    }

    &:nth-of-type(#{$i}),
    &:nth-of-type(#{$i + $point-count / 2}) {
      &:before {
        animation-delay: -$spin-animation-time +
          ($spin-animation-time / $point-count * 2 * ($i - 1));
      }
    }
  }

0 个答案:

没有答案