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

tsc-aliasが実行されない #10030

Closed
kabo2468 opened this issue Feb 23, 2023 · 13 comments
Closed

tsc-aliasが実行されない #10030

kabo2468 opened this issue Feb 23, 2023 · 13 comments
Labels
🐛Bug Unexpected behavior

Comments

@kabo2468
Copy link
Contributor

kabo2468 commented Feb 23, 2023

💡 Summary

5ec07ed から型エラーが全部無くなったことによってbackendのbuildコマンドの

tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json

のtsc-aliasまで実行されない

🥰 Expected Behavior

ビルドが正常に終わる

🤬 Actual Behavior

tsc-aliasまで実行されない

📝 Steps to Reproduce

1.pnpm clean
2.pnpm build

📌 Environment

Misskey version: 5ec07ed
Your OS: Windows 10

@kabo2468 kabo2468 added the ⚠️bug? This might be a bug label Feb 23, 2023
@syuilo
Copy link
Member

syuilo commented Feb 23, 2023

@kabo2468
Copy link
Contributor Author

kabo2468 commented Feb 23, 2023

型エラーが出るとexit codeで0以外を返す
そしてコマンドのa || bは「aが失敗したときにbを実行する」という意味なので、型エラーが無いとtsc以降のコマンドが実行されない

@syuilo
Copy link
Member

syuilo commented Feb 23, 2023

なるほど
ただ13.7.1からはビルドにswc使うようになったから影響は軽微かも

@syuilo
Copy link
Member

syuilo commented Feb 23, 2023

多分直った

@syuilo syuilo added 🐛Bug Unexpected behavior and removed ⚠️bug? This might be a bug labels Feb 23, 2023
@kabo2468
Copy link
Contributor Author

直った

@kabo2468
Copy link
Contributor Author

swcはWindowsだと(?)このエラーが出てビルドできない
要検証

packages/backend build$ swc src -d built -D
│ failed to read swcrc file (src/config.ts)
│ Caused by:
│     0: failed to canonicalize base url using the path of .swcrc
│        Dir:
│        (Used logic for windows)
│     1: 指定されたパスが見つかりません。 (os error 3)
│ failed to read swcrc file (src/decorators.ts)
│ Caused by:
│     0: failed to canonicalize base url using the path of .swcrc
│        Dir:
│        (Used logic for windows)
│     1: 指定されたパスが見つかりません。 (os error 3)
...

@syuilo
Copy link
Member

syuilo commented Feb 23, 2023

しゅいろさんもビルドできなかった

@syuilo
Copy link
Member

syuilo commented Feb 23, 2023

tasukete

@syuilo
Copy link
Member

syuilo commented Feb 23, 2023

こんな感じ
image

@syuilo
Copy link
Member

syuilo commented Feb 23, 2023

tscに戻すか

@tamaina
Copy link
Contributor

tamaina commented Feb 23, 2023

Windows開発環境でだけtsc使うようにしてほしい

@cffnpwr
Copy link
Contributor

cffnpwr commented Feb 23, 2023

failed to canonicalize base urlで調べたら本家swcのIssueにswc-project/swc#702 というのがあって、ここに書いてあるとおり.swcrc

baseUrl: "src",
paths: {"@/*": ["*"]},

としたら手元のWindows11でビルドが通りました

@cffnpwr
Copy link
Contributor

cffnpwr commented Feb 23, 2023

今、Docker環境でビルドしているので正常動作していそうだったらPR飛ばします

ribose-jeffreylau added a commit to paneron/extension-wlcs-registry that referenced this issue May 22, 2023
ribose-jeffreylau added a commit to paneron/extension-wlcs-registry that referenced this issue May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior
Projects
None yet
Development

No branches or pull requests

4 participants