Skip to content

Commit

Permalink
fix: pnpm dev時にファイルが空ならバックエンドの起動を待つように (#10210)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ry0taK authored Mar 5, 2023
1 parent ad43011 commit 8e8c2b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ const fs = require('fs');

const start = async () => {
try {
const exist = fs.existsSync(__dirname + '/../packages/backend/built/boot/index.js')
if (!exist) throw new Error('not exist yet');
const stat = fs.statSync(__dirname + '/../packages/backend/built/boot/index.js');
if (!stat) throw new Error('not exist yet');
if (stat.size === 0) throw new Error('not built yet');

await execa('pnpm', ['start'], {
cwd: __dirname + '/../',
Expand Down

0 comments on commit 8e8c2b4

Please sign in to comment.