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

Aperta
#50 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@adimiz1 ci sta già lavorando.

Dal 25/9/2025.

  • #1 di @SanskritiSharma-13 — integrata
  • #51 di @itspavant — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
TypeScript
Stelle
28
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudinary/cloudinary-react-native

Tutte le issue di cloudinary/cloudinary-react-native

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.