Tencent / Metis

Metis is a learnware platform in the field of AIOps.
Other
1.68k stars 495 forks source link

metis 前端启动报错 #102

Open Liyaozhou opened 3 years ago

Liyaozhou commented 3 years ago

[root@hlink1 uweb]# npm run build

metis-web@1.0.0 build /root/Metis/uweb node lib/uw-frame/lib/cli/build

clean-webpack-plugin: /root/Metis/uweb/dist has been removed. ℹ 「atl」: Using typescript@2.9.2 from typescript ℹ 「atl」: Using tsconfig.json from /root/Metis/uweb/lib/uw-frame/lib/config/tsconfig.json ℹ 「atl」: Checking started in a separate process... ✖ 「atl」: Checking finished with 1 errors

zhoukang0807 commented 3 years ago

文件:Metis\uweb\lib\uw-frame\lib\core\builtIn\login.ts Ts类型转换报错 42行和43行 替换为 let queryWoTicket = qs.stringify(queryWithoutTicket); history.replace(${pathname}${queryWoTicket === '' ? '' :?${queryWoTicket}});

Tomcroods commented 3 years ago

文件:Metis\uweb\lib\uw-frame\lib\core\builtIn\login.ts Ts类型转换报错 42行和43行 替换为 let queryWoTicket = qs.stringify(queryWithoutTicket); history.replace(${pathname}${queryWoTicket === '' ? '' :?${queryWoTicket}});

感谢zhoukang0807的评论,但其中的$和}前面的特殊符号在github评论区显示不出来,实际上要表达的意思是使用一个新的变量queryWoTicket。从而避免类型转换问题。

fudiyang commented 1 year ago

你好,我也是前端启动报错,也有你提到的这个错误,按你的方式解决了,但还有6个TS2339: Property 'iframe' does not exist on type '{}'.这种类似的问题,编译成功后,但访问地址没有内容,请问你还有编译运行成功后的包吗