Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/db-migration-backwards-compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ jobs:
run: pnpm run wait-until-postgres-is-ready:pg_isready

- name: Wait on Inbucket
run: pnpx wait-on tcp:localhost:8129
run: pnpm exec wait-on tcp:localhost:8129

- name: Wait on Svix
run: pnpx wait-on tcp:localhost:8113
run: pnpm exec wait-on tcp:localhost:8113

- name: Wait on ClickHouse
run: pnpx wait-on http://localhost:8136/ping
run: pnpm exec wait-on http://localhost:8136/ping

- name: Initialize database
run: pnpm run db:init
Expand Down Expand Up @@ -339,13 +339,13 @@ jobs:
run: pnpm run wait-until-postgres-is-ready:pg_isready

- name: Wait on Inbucket
run: pnpx wait-on tcp:localhost:8129
run: pnpm exec wait-on tcp:localhost:8129

- name: Wait on Svix
run: pnpx wait-on tcp:localhost:8113
run: pnpm exec wait-on tcp:localhost:8113

- name: Wait on ClickHouse
run: pnpx wait-on http://localhost:8136/ping
run: pnpm exec wait-on http://localhost:8136/ping

- name: Initialize database
run: pnpm run db:init
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-api-tests-local-emulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ jobs:
run: pnpm run wait-until-postgres-is-ready:pg_isready

- name: Wait on Inbucket
run: pnpx wait-on tcp:localhost:8129
run: pnpm exec wait-on tcp:localhost:8129

- name: Wait on Svix
run: pnpx wait-on tcp:localhost:8113
run: pnpm exec wait-on tcp:localhost:8113

- name: Wait on QStash
run: pnpx wait-on tcp:localhost:8125
run: pnpm exec wait-on tcp:localhost:8125

- name: Wait on ClickHouse
run: pnpx wait-on http://localhost:8136/ping
run: pnpm exec wait-on http://localhost:8136/ping

- name: Initialize database
run: pnpm run db:init
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-api-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ jobs:
run: pnpm run wait-until-postgres-is-ready:pg_isready

- name: Wait on Inbucket
run: pnpx wait-on tcp:localhost:8129
run: pnpm exec wait-on tcp:localhost:8129

- name: Wait on Svix
run: pnpx wait-on tcp:localhost:8113
run: pnpm exec wait-on tcp:localhost:8113

- name: Wait on QStash
run: pnpx wait-on tcp:localhost:8125
run: pnpm exec wait-on tcp:localhost:8125

- name: Wait on ClickHouse
run: pnpx wait-on http://localhost:8136/ping
run: pnpm exec wait-on http://localhost:8136/ping

- name: Initialize database
run: pnpm run db:init
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-custom-base-port-api-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ jobs:
run: pnpm run wait-until-postgres-is-ready:pg_isready

- name: Wait on Inbucket
run: pnpx wait-on tcp:localhost:6729
run: pnpm exec wait-on tcp:localhost:6729

- name: Wait on Svix
run: pnpx wait-on tcp:localhost:6713
run: pnpm exec wait-on tcp:localhost:6713

- name: Wait on QStash
run: pnpx wait-on tcp:localhost:6725
run: pnpm exec wait-on tcp:localhost:6725

- name: Wait on ClickHouse
run: pnpx wait-on http://localhost:6736/ping
run: pnpm exec wait-on http://localhost:6736/ping

- name: Initialize database
run: pnpm run db:init
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"repository": "https://github.com/stack-auth/stack-auth",
"scripts": {
"pre-no-codegen": "pnpx only-allow pnpm",
"pre-preinstall": "pnpx only-allow pnpm && node -e \"if(process.env.STACK_SKIP_TEMPLATE_GENERATION !== 'true') require('child_process').execSync('pnpx --package=tsx tsx ./scripts/generate-sdks.ts', {stdio: 'inherit'})\"",
"pre-no-codegen": "pnpm exec only-allow pnpm",
Comment thread
cursor[bot] marked this conversation as resolved.
"pre-preinstall": "pnpx only-allow@1.2.2 pnpm && node -e \"if(process.env.STACK_SKIP_TEMPLATE_GENERATION !== 'true') require('child_process').execSync('pnpm exec tsx ./scripts/generate-sdks.ts', {stdio: 'inherit'})\"",
"pre": "pnpm pre-preinstall",
"preinstall": "pnpm pre-preinstall",
"typecheck": "pnpm pre && turbo typecheck --",
Expand All @@ -16,7 +16,7 @@
"build:demo": "pnpm pre && turbo run build --filter=demo-app...",
"build:docs": "pnpm run build:packages && pnpm run codegen && pnpm run build:backend && pnpm run --filter=@stackframe/stack-docs generate-openapi-docs && turbo run build --filter=@stackframe/stack-docs",
"build:packages": "pnpm pre && turbo run build --filter=./packages/*",
"restart-dev-in-background": "pnpm pre && pnpm run kill-dev:named && (pnpm run dev:named > dev-server.log.untracked.txt 2>&1 &) && echo 'Starting dev server in background... (Logs are in dev-server.log.untracked.txt)' && pnpx wait-on http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02 -t 120000 && echo 'Dev server running.'",
"restart-dev-in-background": "pnpm pre && pnpm run kill-dev:named && (pnpm run dev:named > dev-server.log.untracked.txt 2>&1 &) && echo 'Starting dev server in background... (Logs are in dev-server.log.untracked.txt)' && pnpm exec wait-on http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02 -t 120000 && echo 'Dev server running.'",
"restart-dev-environment": "pnpm pre && pnpm run build:packages && pnpm run codegen && pnpm run restart-deps && pnpm run restart-dev-in-background",
"stop-dev-environment": "pnpm pre && pnpm run kill-dev:named && pnpm run stop-deps",
"clean": "pnpm pre-no-codegen && turbo run clean && rimraf --glob **/.next && rimraf --glob **/.turbo && rimraf .turbo && rimraf --glob **/node_modules && rimraf node_modules",
Expand All @@ -35,7 +35,7 @@
"stop-deps": "POSTGRES_DELAY_MS=0 pnpm run deps-compose kill && POSTGRES_DELAY_MS=0 pnpm run deps-compose down -v",
"wait-until-postgres-is-ready:pg_isready": "until pg_isready -h localhost -p ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}28 && pg_isready -h localhost -p ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}34; do sleep 1; done",
"wait-until-postgres-is-ready": "command -v pg_isready >/dev/null 2>&1 && pnpm run wait-until-postgres-is-ready:pg_isready || sleep 10 # not everyone has pg_isready installed, so we fallback to sleeping",
"wait-until-clickhouse-is-ready": "pnpx wait-on http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}36/ping",
"wait-until-clickhouse-is-ready": "pnpm exec wait-on http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}36/ping",
"start-deps:no-delay": "pnpm pre && pnpm run deps-compose up --detach --build && pnpm run wait-until-postgres-is-ready && pnpm run wait-until-clickhouse-is-ready && pnpm run db:init && echo \"\\nDependencies started in the background as Docker containers. 'pnpm run stop-deps' to stop them\"n",
"start-deps": "POSTGRES_DELAY_MS=${POSTGRES_DELAY_MS:-0} pnpm run start-deps:no-delay",
"restart-deps": "pnpm pre && pnpm run stop-deps && pnpm run start-deps",
Expand Down Expand Up @@ -74,7 +74,7 @@
"test:unit": "pnpm pre && vitest src",
"verify-data-integrity": "pnpm pre && pnpm -C apps/backend run verify-data-integrity",
"generate-keys": "pnpm pre && turbo run generate-keys",
"generate-sdks": "pnpx --package=tsx tsx ./scripts/generate-sdks.ts",
"generate-sdks": "pnpm exec tsx ./scripts/generate-sdks.ts",
"generate-sdks:watch": "chokidar --silent -c 'pnpm run generate-sdks' './packages/template' --ignore './packages/template/package.json' --ignore '**/node_modules/**' --ignore '**/dist/**' --ignore '**/.turbo/**' --throttle 2000",
"generate-openapi-docs:watch": "chokidar --silent -c 'pnpm run --filter=@stackframe/stack-docs generate-openapi-docs' './docs/public/openapi/{admin,client,server,webhooks}.json' --throttle 2000"
},
Expand Down
20 changes: 12 additions & 8 deletions packages/init-stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"test-run-no-browser": "rimraf test-run-output && mkdir test-run-output && cd test-run-output && npm init --init-author-name example-author --init-license UNLICENSED --init-author-url http://example.com --init-module test-run-output --init-version 1.0.0 -y && cd .. && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --server --npm --no-browser",
"test-run-node:manual": "rimraf test-run-output && mkdir test-run-output && cd test-run-output && npm init && cd .. && pnpm run init-stack:local test-run-output",
"test-run-node": "rimraf test-run-output && mkdir test-run-output && cd test-run-output && npm init --init-author-name example-author --init-license UNLICENSED --init-author-url http://example.com --init-module test-run-output --init-version 1.0.0 -y && cd .. && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --server --npm --no-browser",
"test-run-js:manual": "rimraf test-run-output && pnpx sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
"test-run-js": "rimraf test-run-output && pnpx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
"test-run-next:manual": "rimraf test-run-output && pnpx create-next-app@latest test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-react": "rimraf test-run-output && pnpx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
"test-run-react:manual": "rimraf test-run-output && pnpx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"
"test-run-js:manual": "rimraf test-run-output && pnpm exec sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
"test-run-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
"test-run-next:manual": "rimraf test-run-output && pnpm exec create-next-app test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
Comment on lines +25 to +30
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These scripts switched from pnpx to pnpm exec sv ..., but sv is not listed as a dependency/devDependency anywhere in the repo, so pnpm exec sv will fail. If the intent is to run Svelte's generator without adding it as a dependency, use pnpm dlx sv ... (or keep pnpx).

Suggested change
"test-run-js:manual": "rimraf test-run-output && pnpm exec sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
"test-run-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
"test-run-next:manual": "rimraf test-run-output && pnpm exec create-next-app test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-js:manual": "rimraf test-run-output && pnpm dlx sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
"test-run-js": "rimraf test-run-output && pnpm dlx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
"test-run-next:manual": "rimraf test-run-output && pnpm exec create-next-app test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm dlx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",

Copilot uses AI. Check for mistakes.
"test-run-react": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
"test-run-react:manual": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"
Comment on lines +27 to +32
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These scripts now use pnpm exec create-next-app / pnpm exec create-vite, but those packages are not present in workspace dependencies, so the commands won't be found. Either add create-next-app and create-vite as (dev)dependencies of this package, or use pnpm dlx create-next-app@latest ... / pnpm dlx create-vite@latest ... (or keep pnpx).

Suggested change
"test-run-next:manual": "rimraf test-run-output && pnpm exec create-next-app test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-react": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
"test-run-react:manual": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"
"test-run-next:manual": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-react": "rimraf test-run-output && pnpm dlx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
"test-run-react:manual": "rimraf test-run-output && pnpm dlx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"

Copilot uses AI. Check for mistakes.
Comment thread
cursor[bot] marked this conversation as resolved.
Comment on lines +25 to +32
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that sv, create-next-app, and create-vite are not dependencies

echo "=== Checking packages/init-stack/package.json for scaffolding tools ==="
cat packages/init-stack/package.json | jq '.dependencies + .devDependencies | keys[]' 2>/dev/null | grep -E '(sv|create-next-app|create-vite)' || echo "Not found in init-stack"

echo ""
echo "=== Checking root package.json for scaffolding tools ==="
cat package.json | jq '.dependencies + .devDependencies | keys[]' 2>/dev/null | grep -E '(sv|create-next-app|create-vite)' || echo "Not found in root"

echo ""
echo "=== Search for these packages anywhere in the monorepo ==="
rg -l '"(sv|create-next-app|create-vite)"' --glob '*/package.json' --glob 'package.json' 2>/dev/null || echo "No matches found"

Repository: stack-auth/stack-auth

Length of output: 313


🏁 Script executed:

# Check the git diff for the package.json file
cd packages/init-stack && git diff HEAD package.json | head -100

Repository: stack-auth/stack-auth

Length of output: 47


🏁 Script executed:

cd packages/init-stack && git log --oneline -10 package.json

Repository: stack-auth/stack-auth

Length of output: 100


🏁 Script executed:

cd packages/init-stack && git show HEAD:package.json | sed -n '25,32p'

Repository: stack-auth/stack-auth

Length of output: 1342


🏁 Script executed:

head -35 packages/init-stack/package.json | tail -11

Repository: stack-auth/stack-auth

Length of output: 2039


🏁 Script executed:

git show efaaf9d5:packages/init-stack/package.json | head -35 | tail -11

Repository: stack-auth/stack-auth

Length of output: 2039


🏁 Script executed:

git show efaaf9d5^:packages/init-stack/package.json | head -35 | tail -11

Repository: stack-auth/stack-auth

Length of output: 104


🏁 Script executed:

git show efaaf9d5 --stat

Repository: stack-auth/stack-auth

Length of output: 50378


🌐 Web query:

pnpm exec vs pnpx difference behavior uninstalled packages

💡 Result:

  • pnpm exec <cmd>: runs a command in the context of the current project by adding the project’s node_modules/.bin to PATH, so it can execute binaries from already-installed dependencies. If the binary/package isn’t installed in the project, it typically won’t be found. [1]

  • pnpx <pkg-or-cmd> (deprecated) / pnpm dlx <pkg>: runs a package without adding it to your project dependencies by fetching it from the registry and running it in a temporary/hotloaded environment—so it works even when the package is not installed in your project. [2] Older pnpx also had behavior around installing missing packages (with prompts / yes/no flags). [3]

  • Status / recommendation: pnpx was slated for removal; pnpm recommends using pnpm exec (local, installed) and pnpm dlx (temporary, not installed) instead. [4]

Sources: [1] [2] [3] [4]
[1] (dimava.github.io) [2] (dimava.github.io) [3] (app.unpkg.com) [4] (newreleases.io)

Citations:


Replace pnpm exec with pnpm dlx for scaffolding tools that aren't installed.

Changing from pnpx (or npx) to pnpm exec breaks these test scripts. pnpm exec only runs binaries from locally installed packages, but sv, create-next-app, and create-vite are not dependencies of this package or the monorepo root. These are scaffolding tools meant to be downloaded on-demand.

pnpm dlx is pnpm's replacement for npx—it downloads and runs packages temporarily without requiring installation. Use it for these commands:

Recommended fix
-    "test-run-js:manual": "rimraf test-run-output && pnpm exec sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
-    "test-run-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
-    "test-run-next:manual": "rimraf test-run-output && pnpm exec create-next-app test-run-output && pnpm run init-stack:local test-run-output",
-    "test-run-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
-    "test-run-keys-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
-    "test-run-keys-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
-    "test-run-react": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
-    "test-run-react:manual": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"
+    "test-run-js:manual": "rimraf test-run-output && pnpm dlx sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
+    "test-run-js": "rimraf test-run-output && pnpm dlx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
+    "test-run-next:manual": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output && pnpm run init-stack:local test-run-output",
+    "test-run-next": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
+    "test-run-keys-next": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
+    "test-run-keys-js": "rimraf test-run-output && pnpm dlx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
+    "test-run-react": "rimraf test-run-output && pnpm dlx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
+    "test-run-react:manual": "rimraf test-run-output && pnpm dlx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"test-run-js:manual": "rimraf test-run-output && pnpm exec sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
"test-run-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
"test-run-next:manual": "rimraf test-run-output && pnpm exec create-next-app test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-react": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
"test-run-react:manual": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"
"test-run-js:manual": "rimraf test-run-output && pnpm dlx sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
"test-run-js": "rimraf test-run-output && pnpm dlx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
"test-run-next:manual": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm dlx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-react": "rimraf test-run-output && pnpm dlx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
"test-run-react:manual": "rimraf test-run-output && pnpm dlx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/init-stack/package.json` around lines 25 - 32, The scripts using
pnpm exec (see package.json script names test-run-js:manual, test-run-js,
test-run-next:manual, test-run-next, test-run-keys-next, test-run-keys-js,
test-run-react, test-run-react:manual) invoke scaffolding tools (sv,
create-next-app, create-vite) that are not installed locally; change those
invocations from "pnpm exec" to "pnpm dlx" so pnpm will download and run the
tooling on-demand (replace each "pnpm exec <tool>" with "pnpm dlx <tool>" while
leaving the rest of each command unchanged).

Comment thread
vercel[bot] marked this conversation as resolved.
Comment on lines +25 to +32
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 pnpm exec cannot locate uninstalled scaffold tools

pnpm exec only runs binaries that are already present in node_modules/.bin. The tools sv (SvelteKit CLI), create-next-app, and create-vite are not listed as dependencies anywhere in the workspace (neither in this package's devDependencies nor in the root package.json). Calling pnpm exec sv create, pnpm exec create-next-app, and pnpm exec create-vite will therefore fail with a "command not found" error for anyone running these test scripts.

The original pnpx <pkg> (alias for pnpm dlx) was correct here because it fetches and executes packages from the registry without requiring them to be installed locally. These scaffold tools are one-off CLI tools and are intentionally kept out of the dependency tree.

Affected scripts: test-run-js:manual, test-run-js, test-run-next:manual, test-run-next, test-run-keys-next, test-run-keys-js, test-run-react, test-run-react:manual.

The fix is to replace pnpm exec with pnpm dlx (and restore the @latest version tags for create-next-app and create-vite):

Suggested change
"test-run-js:manual": "rimraf test-run-output && pnpm exec sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
"test-run-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
"test-run-next:manual": "rimraf test-run-output && pnpm exec create-next-app test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm exec create-next-app test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm exec sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-react": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
"test-run-react:manual": "rimraf test-run-output && pnpm exec create-vite test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"
"test-run-js:manual": "rimraf test-run-output && pnpm dlx sv create test-run-output --no-install && pnpm run init-stack:local test-run-output",
"test-run-js": "rimraf test-run-output && pnpm dlx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --no-browser",
"test-run-next:manual": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output && pnpm run init-stack:local test-run-output",
"test-run-next": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser",
"test-run-keys-next": "rimraf test-run-output && pnpm dlx create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-keys-js": "rimraf test-run-output && pnpm dlx sv create test-run-output --template minimal --types ts --no-add-ons --no-install && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --js --client --npm --project-id my-project-id --publishable-client-key my-publishable-client-key",
"test-run-react": "rimraf test-run-output && pnpm dlx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --on-question error --no-warn-uncommitted-changes --no-browser --npm",
"test-run-react:manual": "rimraf test-run-output && pnpm dlx create-vite@latest test-run-output --template react-ts && pnpm run init-stack:local test-run-output --react"

},
"files": [
"README.md",
Expand All @@ -51,7 +51,11 @@
"devDependencies": {
"@types/inquirer": "^9.0.7",
"@types/node": "20.17.6",
"create-next-app": "^16.2.1",
"create-vite": "^9.0.3",
"only-allow": "^1.2.1",
"rimraf": "^6.1.2",
"sv": "^0.12.8",
"tsdown": "^0.20.3",
"typescript": "5.9.3"
},
Expand Down
Loading
Loading