Skip to content
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

🐛 Bug: Crash in --mode create if pnpm version mismatches #1513

Closed
3 tasks done
JoshuaKGoldberg opened this issue May 10, 2024 · 0 comments · Fixed by #1529
Closed
3 tasks done

🐛 Bug: Crash in --mode create if pnpm version mismatches #1513

JoshuaKGoldberg opened this issue May 10, 2024 · 0 comments · Fixed by #1529
Labels
status: in discussion Not yet ready for implementation or a pull request type: bug Something isn't working :(

Comments

@JoshuaKGoldberg
Copy link
Owner

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? ...?

@JoshuaKGoldberg JoshuaKGoldberg added type: bug Something isn't working :( status: in discussion Not yet ready for implementation or a pull request labels May 10, 2024
JoshuaKGoldberg added a commit that referenced this issue May 21, 2024
## PR Checklist

- [x] Addresses an existing open issue: fixes #1513
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Right now, trying to use `create-typescript-app` with anything but the
_exact correct pnpm major.minor.patch version_ installed produces an
error. That's very annoying.

Pending nodejs/corepack#95, removes usage of
the [experimental `package.json` `packageManager`
field](https://nodejs.org/api/packages.html#packagemanager).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in discussion Not yet ready for implementation or a pull request type: bug Something isn't working :(
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant