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

[Bug]: Build error when components file is empty / コンポーネントのファイルがからの場合にビルドエラー #199

Open
mantaroh opened this issue Sep 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mantaroh
Copy link
Collaborator

📦 Package / パッケージ

spear-cli

📝 Issue Description / 問題の説明

When I build the empty component file, spear-cli will crash.
コンポーネントファイルにからのものが含まれると、ビルドエラーとなります。

  [Page]: index(/)
file:///home/....../node_modules/@spearly/spear-cli/dist/magic.js:110
                "rawData": parsedNode[0].outerHTML,
                                         ^

TypeError: Cannot read properties of undefined (reading 'outerHTML')
    at file:///home/....../node_modules/@spearly/spear-cli/dist/magic.js:110:42
    at Generator.next (<anonymous>)
    at fulfilled (file:///home/......./node_modules/@spearly/spear-cli/dist/magic.js:4:58)

Node.js v18.16.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

🤔 Expected Behavior / 期待結果

Skip these component empty component files.
これらの空のコンポーネントファイルは処理をスキップしてほしい

👀 Current Behavior / 現在の動き

Crash, and return the 1 status code.
クラッシュして 1 を返す

🖥️ Browser / ブラウザ

N/A

📄 Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant