Issue: Improve `bootstrap.js` to support both Yarn and NPM with clearer errors

Offen
#50 3 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@adimiz1 arbeitet bereits daran.

Seit 25.9.2025.

  • #1 von @SanskritiSharma-13 — gemerged
  • #51 von @itspavant — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

Feature request for Cloudinary React Native SDK

Improve scripts/bootstrap.js to support both Yarn and NPM with clearer error handling.

Explain your use case

When contributing to this repository, new developers typically start with npm install.
However, the current scripts/bootstrap.js assumes Yarn is installed.
If Yarn is missing, the script fails without guidance, making onboarding harder for contributors who default to npm.

Describe the problem you’re trying to solve

Right now:

  • The script hardcodes Yarn and fails if it’s not installed.
  • There is no fallback to npm run bootstrap.
  • If bootstrap is not defined in package.json, the script exits with no explanation.

This creates friction for new contributors and may result in unnecessary issues being opened.

Do you have a proposed solution?

Yes.

  • Detect if Yarn is available; if not, fall back to npm run bootstrap.
  • Allow contributors to explicitly prefer npm (e.g. with a flag like --use-npm).
  • Validate that a bootstrap script exists in package.json before trying to run it.
  • Print clear, contributor-friendly error messages when something fails.

This change would not alter the default behavior for Yarn users, but it would improve reliability, reduce confusion, and make onboarding easier for developers using npm.

Vorherrschende Sprache
TypeScript
Sterne
28
Forks
21
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus cloudinary/cloudinary-react-native

Alle Issues in cloudinary/cloudinary-react-native

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.