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

Ouverte
#50 3 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@adimiz1 y travaille déjà.

Depuis le 25/9/2025.

  • #1 par @SanskritiSharma-13 — fusionnée
  • #51 par @itspavant — ouverte

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.

Langage dominant
TypeScript
Étoiles
28
Forks
21
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cloudinary/cloudinary-react-native

Toutes les issues de cloudinary/cloudinary-react-native

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.