π Bug: Crash in --mode create if pnpm version mismatches
JoshuaKGoldberg opened this issue Β· 1 comments
JoshuaKGoldberg commented
Bug Report Checklist
- I have tried restarting my IDE and the issue persists.
- I have pulled the latest
main
branch of the repository. - I have searched for related issues and found none that matched my issue.
Expected
When you run npx create-typescript-app --mode create ...
, the CLI should create a new repository as long as you have Node.js and pnpm installed.
Actual
If your local pnpm version isn't the expected one:
β β Error installing packages.
β
Error: Failed installing packages
at withSpinner (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/shared/cli/spinners.js:16:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async createWithOptions (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/create/createWithOptions.js:33:5)
... 3 lines matching cause stack trace ...
at async bin (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/bin/index.js:67:36)
at async file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/bin/index.js:4:20 {
[cause]: Error: Command failed with exit code 1: pnpm add @release-it/conventional-changelog@latest @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest @vitest/coverage-v8@latest all-contributors-cli@latest console-fail-test@latest cspell@latest eslint@latest eslint-plugin-deprecation@latest eslint-plugin-eslint-comments@latest eslint-plugin-jsdoc@latest eslint-plugin-jsonc@latest eslint-plugin-markdown@latest eslint-plugin-n@latest eslint-plugin-package-json@latest eslint-plugin-perfectionist@latest eslint-plugin-regexp@latest eslint-plugin-vitest@latest eslint-plugin-yml@latest husky@latest jsonc-eslint-parser@latest knip@latest lint-staged@latest markdownlint@latest markdownlint-cli@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest release-it@latest sentences-per-line@latest tsup@latest typescript@latest vitest@latest yaml-eslint-parser@latest -D
βERR_PNPM_BAD_PM_VERSIONβ This project is configured to use v8.15.4 of pnpm. Your current pnpm is v9.0.6
If you want to bypass this version check, you can set the "package-manager-strict" configuration to "false" or set the "COREPACK_ENABLE_STRICT" environment variable to "0"
Additional Info
I'm not sure what the right resolution would be... changing the pnpm version to the user's? Prompting them to install a new one? Disabling strict pnpm version checks? ...?
github-actions commented