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

Abierto
#50 3 comentarios 0 reacciones 1 asignado Ver en GitHub

@adimiz1 ya está trabajando en esto.

Desde el 25/9/2025.

  • #1 de @SanskritiSharma-13 — fusionado
  • #51 de @itspavant — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
28
Forks
21
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cloudinary/cloudinary-react-native

Todos los issues de cloudinary/cloudinary-react-native

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.