1943time / inkdown

A WYSIWYG Markdown editor, improve reading and editing experience. and generate your Markdown files into online documents in the easiest and fastest way.
https://www.inkdown.me
GNU Affero General Public License v3.0
861 stars 35 forks source link

[Bugs] 在ArchLinux下编译出错 #1

Closed zxp19821005 closed 9 months ago

zxp19821005 commented 10 months ago

如题。0.7.0版本。 执行完pnpm install之后,执行pnpm build,报错信息如下:

Could not resolve "../share/User" from "src/renderer/src/components/Nav.tsx"
file: /home/zxp-endeavouros/.cache/paru/clone/bluestone/src/bluestone-0.7.0/src/renderer/src/components/Nav.tsx
error during preview electron app:
RollupError: Could not resolve "../share/User" from "src/renderer/src/components/Nav.tsx"
    at error (file:///home/zxp-endeavouros/.cache/paru/clone/bluestone/src/bluestone-0.7.0/node_modules/.pnpm/rollup@3.26.0/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
    at ModuleLoader.handleInvalidResolvedId (file:///home/zxp-endeavouros/.cache/paru/clone/bluestone/src/bluestone-0.7.0/node_modules/.pnpm/rollup@3.26.0/node_modules/rollup/dist/es/shared/node-entry.js:24632:24)
    at file:///home/zxp-endeavouros/.cache/paru/clone/bluestone/src/bluestone-0.7.0/node_modules/.pnpm/rollup@3.26.0/node_modules/rollup/dist/es/shared/node-entry.js:24594:26
 ELIFECYCLE  Command failed with exit code 1.

看了下源代码,在bluestone-0.7.0/src/renderer/src/components/Nav.tsx中有三行:

import {Login} from '../share/Login'
import {User} from '../share/User'
import {Share} from '../share/Share'

而在share目录中,确实是没有任何文件。

1943time commented 10 months ago

可以将这个引用注释掉,不影响编辑器主功能,这里是分享逻辑,涉及到和服务端交互,比较敏感,暂未开源

1943time commented 10 months ago

我之后会把分享开到另一个分支去,主分支保留单机功能

zxp19821005 commented 10 months ago

OK 那我再编译试试看

zxp19821005 commented 10 months ago

编译成功!已经移植到AUR:https://aur.archlinux.org/packages/bluestone PKGBUILD文件:https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=bluestone

zxp19821005 commented 9 months ago

0.9.1版本代码里面又出现了~

import {Share} from '../share/Share'
import {User} from '../share/User'
1943time commented 9 months ago

如果仅需要linux版本,我想办法发布一下linux版,如果需要运行代码作参考,我加入了注释,这两行去掉即可。

image

不知这样是否能解决你的使用场景

zxp19821005 commented 9 months ago

如果能否发布Linux版本是做好了,谢谢!

moshpirit commented 9 months ago

Hello, sorry if I'm missing something here, I don't speak Chinese. I'm getting this error on Arch Linux:

src/renderer/src/components/Nav.tsx:8:21 - error TS2307: Cannot find module '../share/Share' or its corresponding type declarations.

8 import {Share} from '../share/Share'
                      ~~~~~~~~~~~~~~~~

src/renderer/src/components/Nav.tsx:9:20 - error TS2307: Cannot find module '../share/User' or its corresponding type declarations.

9 import {User} from '../share/User'
                     ~~~~~~~~~~~~~~~
1943time commented 9 months ago

Hello, sorry if I'm missing something here, I don't speak Chinese. I'm getting this error on Arch Linux:

src/renderer/src/components/Nav.tsx:8:21 - error TS2307: Cannot find module '../share/Share' or its corresponding type declarations.

8 import {Share} from '../share/Share'
                      ~~~~~~~~~~~~~~~~

src/renderer/src/components/Nav.tsx:9:20 - error TS2307: Cannot find module '../share/User' or its corresponding type declarations.

9 import {User} from '../share/User'
                     ~~~~~~~~~~~~~~~

This logic includes network services. I will remove them in the next version and add the Linux version. If you want to run it now, just annotate it