Issue: Improve `bootstrap.js` to support both Yarn and NPM with clearer errors
評估
這個 Issue 還沒有評估資料。
描述
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
bootstrapis not defined inpackage.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
bootstrapscript exists inpackage.jsonbefore 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.
- 主要語言
- TypeScript
- 星號
- 28
- 分支
- 21
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
cloudinary/cloudinary-react-native 的其他 Issue
-
hacktoberfest-accepted
難度 3/5 1-2 天 新手友好度 45/100
cloudinary/cloudinary-react-native#55 · 3 則留言 ·
-
Add CODE_OF_CONDUCT.md可能重新可做 @adimiz1 於 405 天前認領,目前沒有進行中的 PR。 未關閉
cloudinary/cloudinary-react-native#53 · 2 則留言 · 已指派 1 人 ·
-
難度 2/5 1-3 小時 新手友好度 45/100
cloudinary/cloudinary-react-native#52 · 8 則留言 ·
-
難度 5/5 一週以上 新手友好度 15/100
-
難度 5/5 一週以上 新手友好度 25/100
cloudinary/cloudinary-react-native#31 · 3 則留言 ·
查看 cloudinary/cloudinary-react-native 的全部 Issue
相似的 Issue
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 70/100
Yeraze/meshmonitor#6407 ·
維護者通常 1 天內回覆
-
area: install-setup needs-info question
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
area:docs documentation good first issue
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 12 天內回覆