V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
qingshui33
0.01D
V2EX  ›  Vue.js

前端项目报 Class constructor g cannot be invoked without 'new,求各位大哥指点下

  •  
  •   qingshui33 · May 14, 2024 · 1323 views
    This topic created in 724 days ago, the information mentioned may be changed or developed.

    项目环境:Vue-class-component + TypeScript ,Vue 版本是 2.6 的

    问题描述:项目在测试环境,编译后会偶发性的出现 Class constructor g cannot be invoked without 'new,在首页或者其他页面都出现过这种问题,但是本地和生产环境又复现不出来,测试环境代码也是编译过后的,目前也没有办法定位到具体的代码,所以想请各位大哥指点下迷津。具体的报错截图如下:

    4 replies    2024-05-15 09:10:08 +08:00
    qingshui33
        2
    qingshui33  
    OP
       May 14, 2024
    @shizhibuyu2023 好的,感谢,我尝试下看看,之前没想着往这个方面尝试,因为大概要牵扯到修改打包命令之类的操作,会比较麻烦
    yanyiming
        3
    yanyiming  
       May 14, 2024 via Android
    没图啊。
    qingshui33
        4
    qingshui33  
    OP
       May 15, 2024
    @yanyiming 我这可以看到,链接是这个 https://imgur.com/KFFJ6h2
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1150 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 23:09 · PVG 07:09 · LAX 16:09 · JFK 19:09
    ♥ Do have faith in what you're doing.