File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 5555 "ee:check" : " infisical run --env=remote -- turbo run ee:check" ,
5656 "ee:build:all" : " dotenv -e .env.local -- turbo run ee:build --cache-dir=.turbo" ,
5757 "mock:incoming-mail" : " dotenv -e .env.local -- pnpm --dir apps/mail-bridge mock:incoming-mail" ,
58- "prepare" : " husky"
58+ "prepare" : " husky" ,
59+ "predev" : " tsx predev.ts"
5960 },
6061 "keywords" : [],
6162 "author" : " Omar McAdam - @McPizza0" ,
Original file line number Diff line number Diff line change 1+ import { lstatSync , readFileSync } from 'fs' ;
2+
3+ // Check Node version
4+ const nodeVersion = process . version ;
5+ const requiredVersion = readFileSync ( '.nvmrc' , 'utf-8' ) . trim ( ) ;
6+
7+ if ( ! nodeVersion . startsWith ( requiredVersion ) ) {
8+ console . error (
9+ `You are using Node ${ nodeVersion } , but this project requires Node ${ requiredVersion } .\nUse the correct node version to run this project`
10+ ) ;
11+ process . exit ( 1 ) ;
12+ }
13+
14+ // Check for env file
15+ const envFile = lstatSync ( '.env.local' , { throwIfNoEntry : false } ) ;
16+ if ( ! envFile ?. isFile ( ) ) {
17+ console . error (
18+ 'You are missing a .env.local file. Please refer to the README for instructions on how to create one.'
19+ ) ;
20+ process . exit ( 1 ) ;
21+ }
You can’t perform that action at this time.
0 commit comments