From 420f2ddeb787c7fff92d57826c6081ed6feb0ab8 Mon Sep 17 00:00:00 2001 From: Thuc Pham <51660321+thucpn@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:43:53 +0700 Subject: [PATCH] Fix: npm script does not run in window machine (#283) --- .github/workflows/e2e.yml | 2 +- packages/create-llama/templates/index.ts | 2 +- .../templates/types/streaming/nextjs/package.json | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 40c612c39..dd2d61565 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -16,7 +16,7 @@ jobs: fail-fast: true matrix: node-version: [18, 20] - os: [macos-latest] # add windows-latest after timeout issue is fixed (see https://github.com/run-llama/LlamaIndexTS/issues/263) + os: [macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/packages/create-llama/templates/index.ts b/packages/create-llama/templates/index.ts index a1b9c46a3..880af9086 100644 --- a/packages/create-llama/templates/index.ts +++ b/packages/create-llama/templates/index.ts @@ -247,7 +247,7 @@ const installTSTemplate = async ({ // modify the dev script to use the custom api path packageJson.scripts = { ...packageJson.scripts, - dev: `NEXT_PUBLIC_CHAT_API=${customApiPath} next dev`, + dev: `cross-env NEXT_PUBLIC_CHAT_API=${customApiPath} next dev`, }; } diff --git a/packages/create-llama/templates/types/streaming/nextjs/package.json b/packages/create-llama/templates/types/streaming/nextjs/package.json index 3160e53c0..2f23029dd 100644 --- a/packages/create-llama/templates/types/streaming/nextjs/package.json +++ b/packages/create-llama/templates/types/streaming/nextjs/package.json @@ -37,6 +37,7 @@ "postcss": "^8.4.32", "tailwindcss": "^3.3.6", "typescript": "^5.3.2", - "@types/react-syntax-highlighter": "^15.5.11" + "@types/react-syntax-highlighter": "^15.5.11", + "cross-env": "^7.0.3" } -} \ No newline at end of file +} -- GitLab