vue项目换环境以后无法启动_修复支持可选链操作符?_invalid expression: Unexpected token ? in---vue工作笔记0029

 先说一下这个问题原因是,本地安装的node.js版本太低了,应该保持在14.0以上

vue我们可以升级到 2.7.0 版本,同时 node 版本升级到 14.0.0

 ERROR  Failed to compile with 6 errors                                                              2:16:03 PM

 error  in ./src/views/system/rawData/views.vue?vue&type=template&id=394f6ccb

Module Error (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
(Emitted value instead of an instance of Error)

  Errors compiling template:

  duplicate attribute: :total

  117|                            stripe
  118|                    -                 :total="obj?.total"
  119|                    +                 :total="obj && obj.total"
     |                      ^^^^^^^^

你可能感兴趣的:(vue项目报错,可选链操作符,vue项目可选链操作符,vue项目node版本,vue项目vue版本)