ant-design-vue-pro icon indicating copy to clipboard operation
ant-design-vue-pro copied to clipboard

yarn run serve出錯

Open Dean3344 opened this issue 3 years ago • 24 comments

使用yran run serve出現錯誤 ERROR Failed to compile with 1 error 上午2:28:46 error in ./src/components/NumberInfo/NumberInfo.vue?vue&type=style&index=0&id=4370c5af&lang=less&scoped=true& Syntax Error: TypeError: Cannot set properties of undefined (setting 'parent')

請問要如何解決,謝謝

完整訊息如下:

yarn run serve yarn run v1.22.19 $ vue-cli-service serve INFO Starting development server... 67% building 1417/1486 modules 69 active ...de_modules\ant-design-vue\es\radio\style\index.less [ @vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

67% building 1437/1499 modules 62 active ...es\webpack-theme-color-replacer\client\varyColor.js [ @vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

67% building 1440/1500 modules 60 active ...\ant-design-vue-pro\node_modules\lodash_baseFor.js [ @vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

67% building 1466/1518 modules 52 active ...node_modules\ant-design-vue\es\empty\style\index.js [ @vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

68% building 1493/1533 modules 40 active ...ign-vue-pro\src\components\FooterToolbar\index.less[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

68% building 1510/1543 modules 33 active ...ules@ant-design-vue\pro-layout\es\BasicLayout.less[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

67% building 1704/1764 modules 60 active ...nents\Charts\ChartCard.vue?vue&type=script&lang=js&[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

68% building 2111/2163 modules 52 active ...pro\node_modules\ant-design-vue\es\vc-rate\index.js[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

68% building 2127/2180 modules 53 active ...vue-pro\node_modules\array-tree-filter\lib\index.js [ @vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

68% building 2141/2191 modules 50 active ...ules\core-js\modules\es.reflect.get-prototype-of.js [ @vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

68% building 2142/2191 modules 49 active ...ules\core-js\modules\es.reflect.get-prototype-of.js [ @vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

95% emitting ThemeColorReplacerExtracted theme color css content length: 28095 98% after emitting CopyPlugin

ERROR Failed to compile with 1 error 上午2:28:46

error in ./src/components/NumberInfo/NumberInfo.vue?vue&type=style&index=0&id=4370c5af&lang=less&scoped=true&

Syntax Error: TypeError: Cannot set properties of undefined (setting 'parent')

Dean3344 avatar Jul 03 '22 06:07 Dean3344

同问

williamsun1993 avatar Jul 05 '22 17:07 williamsun1993

the same

zsf513 avatar Jul 06 '22 02:07 zsf513

node v16.14.2 同样问题

xdqa01 avatar Jul 06 '22 08:07 xdqa01

我也一样

yanB-C avatar Jul 07 '22 10:07 yanB-C

mac,node版本换成v14.16.0也是一样的错误,install时出现了一堆错误,好多依赖都无法使用了

jackz010 avatar Jul 08 '22 03:07 jackz010

  • 可以使用 feat/multi-tab 分支、feat/cdn_imports分支、v3.0.3Tag;
  • git checkout feat/multi-tab ;
  • 参考 ReadMe.md Other pls use release version;
  • 慢慢转 vben吧,或React线吧.

xdqa01 avatar Jul 08 '22 04:07 xdqa01

大佬们找到解决方案了不

fengchenzhihun1 avatar Jul 13 '22 16:07 fengchenzhihun1

去掉 Number.vue 最后那个style里面的属性就好了

fengchenzhihun1 avatar Jul 13 '22 16:07 fengchenzhihun1

这个问题刚遇到

xiaocer avatar Jul 14 '22 06:07 xiaocer

xiaocer avatar Jul 14 '22 06:07 xiaocer

这个问题很神奇,我同一个项目,克隆到两目录,install 的日期不一样。。。一个目录可以正常run,另一个不行。。。我估计可能跟某个库的版本有关系。

XiaoHeitu avatar Jul 14 '22 07:07 XiaoHeitu

按照 xiaocer 的方法确实可以启动了.

yaoli84 avatar Jul 14 '22 08:07 yaoli84

xiaocer的方法可以解决,请问大家是M1遇上这个情况的吗

Lrz-git avatar Jul 18 '22 15:07 Lrz-git

按照 xiaocer 的方法确实可以启动了.

fanxinjian avatar Jul 19 '22 06:07 fanxinjian

xiaocer的方法可以解决,请问大家是M1遇上这个情况的吗

inter i9, same issue.

williamsun1993 avatar Jul 20 '22 06:07 williamsun1993

xiaocer的方法可以解决,请问大家是M1遇上这个情况的吗

inter i9, same issue.

不是M1

fanxinjian avatar Jul 20 '22 06:07 fanxinjian

这个问题很神奇,我同一个项目,克隆到两目录,install 的日期不一样。。。一个目录可以正常run,另一个不行。。。我估计可能跟某个库的版本有关系。

一样情况,原先项目能运行,昨天手欠,删了重新install,就不行了... 不知道哪个库影响了,能找出来吗?

skyw4code avatar Jul 21 '22 02:07 skyw4code

总不能靠注释代码解决问题吧... - - !

抽了点时间看了一下,index.less中

:global {
  .anticon-caret-up {
    color: @red-6;
  }
  .anticon-caret-down {
    color: @green-6;
  }
}

修改为:

::v-deep(.anticon-caret-up) {
  color: @red-6;
}

::v-deep(.anticon-caret-down) {
  color: @green-6;
}

skyw4code avatar Jul 21 '22 10:07 skyw4code

我也是

mortywq avatar Aug 08 '22 04:08 mortywq

一模一样,究竟咋解决啊

mortywq avatar Aug 08 '22 04:08 mortywq

总不能靠注释代码解决问题吧... - - !

抽了点时间看了一下,index.less中

:global {
  .anticon-caret-up {
    color: @red-6;
  }
  .anticon-caret-down {
    color: @green-6;
  }
}

修改为:

::v-deep(.anticon-caret-up) {
  color: @red-6;
}

::v-deep(.anticon-caret-down) {
  color: @green-6;
}

有找到解决方法吗

mortywq avatar Aug 08 '22 04:08 mortywq

因为是vue2.7开始在模版中有替换,但是项目使用的vue2.6 所以猜测应该是其他的库导致的

shylockWu avatar Aug 11 '22 09:08 shylockWu

有人维护吗?

marlti7 avatar Aug 12 '22 08:08 marlti7

有个der

shylockWu avatar Aug 15 '22 01:08 shylockWu