vue3 的原生页面用 babel 转码后为什么还是会报错 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
RunningDurian
V2EX    程序员

vue3 的原生页面用 babel 转码后为什么还是会报错

  • &nsp;
  •   RunningDurian 2021-10-14 18:06:39 +08:00 1187 次点击
    这是一个创建于 1525 天前的主题,其中的信息可能已经有所发展或是发生改变。

    就是标签引入的 js 文件,而且我把 vue,elementui,config 等全部转了 es2015

    没转之前的 报错内容: SCRIPT1014: 无效字符 config.js (2,33) SCRIPT1055: const 赋值 babel.min.js (1,730923) SCRIPT1003: 缺少 ':' index.html (716,30) 转了之后: SCRIPT7002: XMLHttpRequest: 网络错误 0x2efd, 由于出现错误 00002efd 而导致此项操作无法完成。 index.html [Vue warn]: Error in created hook: "TypeError: 无法获取未定义或 null 引用的属性“markInfo”"

    (found in <Root>) TypeError: 无法获取未定义或 null 引用的属性“markInfo” { [functions]: , proto: { }, description: "无法获取未定义或 null 引用的属性“markInfo”", message: "无法获取未定义或 null 引用的属性“markInfo”", name: "TypeError", number: -2146823281, stack: "TypeError: 无法获取未定义或 null 引用的属性“markInfo” at getCustInfo (file:///G:/jt/sszj/agent_front%20-%20 副本 /index.html:846:9) at created (file:///G:/jt/sszj/agent_front%20-%20 副本 /index.html:626:9) at invokeWithErrorHandling (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:286:403) at callHook (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:558:119) at Vue.prototype._init (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:667:1) at Vue (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:672:559) at Global code (file:///G:/jt/sszj/agent_front%20-%20 副本 /index.html:620:1)" } [Vue warn]: Error in render: "ReferenceError: “userForm_1”未定义" (found in <Root>) ReferenceError: “userForm_1”未定义 { [functions]: , proto: { }, description: "“userForm_1”未定义", message: "“userForm_1”未定义", name: "ReferenceError", number: -2146823279, stack: "ReferenceError: “userForm_1”未定义 at Function code (Function code:1:12) at Vue.prototype._render (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:495:29) at updateComponent (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:532:1038) at get (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:614:89) at Watcher (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:612:272) at mountComponent (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:535:1) at Vue.prototype.$mount (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:1031:82) at Vue.prototype.$mount (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:1242:1021) at Vue.prototype._init (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:667:198) at Vue (file:///G:/jt/sszj/agent_front%20-%20 副本 /js/vue.js:672:559)" }

    DimitriYoon
        1
    DimitriYoon  
       2021-10-15 10:35:06 +08:00
    这报错信息貌似是代码的问题,"markinfo"没找到,应该是你哪里用了异步导致 markinfo 没渲染出来或者没加载出来就提前调用了,建议检查一下代码,和 babel 有啥关系吗...
    RunningDurian
        2
    RunningDurian  
    OP
       2021-10-15 14:56:30 +08:00
    哎,我是直接用 babel 转的,网上对应的资料也太少了
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5236 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 34ms UTC 09:02 PVG 17:02 LAX 01:02 JFK 04:02
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86