fix: pnpm dev時にファイルが空ならバックエンドの起動を待つように (#10210)
This commit is contained in:
		
							parent
							
								
									ad43011fb8
								
							
						
					
					
						commit
						8e8c2b40f9
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -40,8 +40,9 @@ const fs = require('fs');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const start = async () => {
 | 
						const start = async () => {
 | 
				
			||||||
		try {
 | 
							try {
 | 
				
			||||||
			const exist = fs.existsSync(__dirname + '/../packages/backend/built/boot/index.js')
 | 
								const stat = fs.statSync(__dirname + '/../packages/backend/built/boot/index.js');
 | 
				
			||||||
			if (!exist) throw new Error('not exist yet');
 | 
								if (!stat) throw new Error('not exist yet');
 | 
				
			||||||
 | 
								if (stat.size === 0) throw new Error('not built yet');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			await execa('pnpm', ['start'], {
 | 
								await execa('pnpm', ['start'], {
 | 
				
			||||||
				cwd: __dirname + '/../',
 | 
									cwd: __dirname + '/../',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue