From 440953ca4200ced2b720f3fbd62b48a17ea888b3 Mon Sep 17 00:00:00 2001 From: Omar-Belghaouti Date: Thu, 16 Jun 2022 17:13:55 +0100 Subject: [PATCH 1/2] check for `package.json` existense before reading --- bin/utils/root-checker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/utils/root-checker.js b/bin/utils/root-checker.js index 06e9f93..ae4f32a 100644 --- a/bin/utils/root-checker.js +++ b/bin/utils/root-checker.js @@ -7,6 +7,7 @@ const fs = require("file-system"); * @author [Omar Belghaouti](https://github.com/Omar-Belghaouti) */ exports.rootChecker = () => { + if (!fs.fs.existsSync("./package.json")) return false; const { dependencies } = JSON.parse(fs.fs.readFileSync("./package.json")); if (dependencies.react && !dependencies["react-native"]) { console.log( From e9a92d464c38dc42c7c72a0c97c968a8e4a43e61 Mon Sep 17 00:00:00 2001 From: Omar-Belghaouti Date: Thu, 16 Jun 2022 17:14:03 +0100 Subject: [PATCH 2/2] 2.3.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 932729e..4387f16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-help-create", - "version": "2.3.3", + "version": "2.3.4", "description": "This command line helps you create components, screens, navigations and even redux implementaion for your react native project.", "main": "bin/index.js", "bin": {