yinxin630 / fiora

An interesting open source chat application. Developed with node.js, mongoDB, socket.io and react
https://fiora.suisuijiang.com
MIT License
6.68k stars 1.33k forks source link

npm run build 以及 npm run move-dist 提示错误。 #152

Closed nihilochyan closed 4 years ago

nihilochyan commented 4 years ago

npm run build 提示ERROR:

ERROR in /root/fiora/client/modules/Chat/Expression.tsx [tsl] ERROR in /root/fiora/client/modules/Chat/Expression.tsx(98,25) TS2322: Type '{ className: any; src: any; alt: string; key: any; referrerPolicy: string; onClick: (e: any) => void; }' is not assignable to type 'DetailedHTMLProps<ImgHTMLAttributes, HTMLImageElement>'. Property 'referrerPolicy' does not exist on type 'DetailedHTMLProps<ImgHTMLAttributes, HTMLImageElement>'.

ERROR in /root/fiora/client/modules/Chat/Message/ImageMessage.tsx [tsl] ERROR in /root/fiora/client/modules/Chat/Message/ImageMessage.tsx(82,25) TS2322: Type '{ className: any; src: string; alt: string; width: number; height: number; onClick: () => void; referrerPolicy: string; }' is not assignable to type 'DetailedHTMLProps<ImgHTMLAttributes, HTMLImageElement>'. Property 'referrerPolicy' does not exist on type 'DetailedHTMLProps<ImgHTMLAttributes, HTMLImageElement>'.

Build complete.

npm run move-dist 提示:

fiora@0.0.1 move-dist /root/fiora rm -rf public/audio && rm -rf public/avatar && rm -rf public/css && rm -rf public/fonts && rm -rf public/img && rm -rf public/js && mv -f dist/fiora/* public

mv: cannot stat 'dist/fiora/': No such file or directory npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! fiora@0.0.1 move-dist: `rm -rf public/audio && rm -rf public/avatar && rm -rf public/css && rm -rf public/fonts && rm -rf public/img && rm -rf public/js && mv -f dist/fiora/ public` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the fiora@0.0.1 move-dist script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-11-29T12_29_49_233Z-debug.log

deway commented 4 years ago

你这个打包,配置文件 是不是改了? 路径错了,找不到生成的路径文件夹

yinxin630 commented 4 years ago

build 失败了

yinxin630 commented 4 years ago

编译报错应该是因为 TypeScript 版本不一致, 源码已经更新了版本并修复了该编译问题