-
Notifications
You must be signed in to change notification settings - Fork 514
Replace npx with pnpm exec #1300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "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
AI
Mar 31, 2026
There was a problem hiding this comment.
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).
| "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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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 -100Repository: stack-auth/stack-auth
Length of output: 47
🏁 Script executed:
cd packages/init-stack && git log --oneline -10 package.jsonRepository: 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 -11Repository: stack-auth/stack-auth
Length of output: 2039
🏁 Script executed:
git show efaaf9d5:packages/init-stack/package.json | head -35 | tail -11Repository: stack-auth/stack-auth
Length of output: 2039
🏁 Script executed:
git show efaaf9d5^:packages/init-stack/package.json | head -35 | tail -11Repository: stack-auth/stack-auth
Length of output: 104
🏁 Script executed:
git show efaaf9d5 --statRepository: 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’snode_modules/.bintoPATH, 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] Olderpnpxalso had behavior around installing missing packages (with prompts / yes/no flags). [3] -
Status / recommendation:
pnpxwas slated for removal; pnpm recommends usingpnpm exec(local, installed) andpnpm 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:
- 1: https://dimava.github.io/pnpm/cli/exec/
- 2: https://dimava.github.io/pnpm/cli/dlx/
- 3: https://app.unpkg.com/pnpm%406.7.6/files/CHANGELOG.md?utm_source=openai
- 4: https://newreleases.io/project/github/pnpm/pnpm/release/v6.13.0?utm_source=openai
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.
| "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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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):
| "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" |
Uh oh!
There was an error while loading. Please reload this page.