-
Notifications
You must be signed in to change notification settings - Fork 240
/
start-fe-dev.bat
41 lines (29 loc) · 935 Bytes
/
start-fe-dev.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
for /f "delims=" %%i in ('node -v') do set "node_version=%%i"
for /f "tokens=2 delims=v." %%i in ("%node_version%") do set "major_version=%%i"
if %major_version% GEQ 17 (
set "NODE_OPTIONS=--openssl-legacy-provider"
echo Node.js version is greater than or equal to 17. NODE_OPTIONS has been set to --openssl-legacy-provider.
)
where /q pnpm
if errorlevel 1 (
echo pnpm is not installed. Installing...
npm install -g pnpm
if errorlevel 1 (
echo Failed to install pnpm. Please check if npm is installed and the network connection is working.
) else (
echo pnpm installed successfully.
)
) else (
echo pnpm is already installed.
)
rmdir /s /q ".\packages\supersonic-fe\src\.umi"
rmdir /s /q ".\packages\supersonic-fe\src\.umi-production"
cd ./packages/chat-sdk
call pnpm i
call pnpm run build
call pnpm link --global
cd ../supersonic-fe
call pnpm link ../chat-sdk
call pnpm i
call pnpm start