Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zxp19821005 opened this issue Aug 22, 2023 · 9 comments
Closed

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

zxp19821005 opened this issue Aug 22, 2023 · 9 comments

Comments

@zxp19821005
Copy link

zxp19821005 commented Aug 22, 2023

如题。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
Copy link
Owner

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

@1943time
Copy link
Owner

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

@zxp19821005
Copy link
Author

OK 那我再编译试试看

@zxp19821005
Copy link
Author

@zxp19821005
Copy link
Author

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

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

@zxp19821005 zxp19821005 reopened this Sep 25, 2023
@1943time
Copy link
Owner

如果仅需要linux版本,我想办法发布一下linux版,如果需要运行代码作参考,我加入了注释,这两行去掉即可。
image
不知这样是否能解决你的使用场景

@zxp19821005
Copy link
Author

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

@moshpirit
Copy link

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
Copy link
Owner

1943time commented Oct 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants