Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while installing React-Native app Could not parse JSON returned from "npm pack expo-template-blank --dry-run". expo-template-blank-45.0.3.tgz

Showing this Error while expo the app

Error downloading and extracting template package: Error: Could not parse JSON returned from "npm pack expo-template-blank --dry-run".
expo-template-blank-45.0.3.tgz

Error: Unexpected token e in JSON at position 0
× Something went wrong while downloading and extracting the template.

Can't read JSON file: G:\ReactNative\FoodApp\app.json
└─ Cause: Error: ENOENT: no such file or directory, open 'G:\ReactNative\FoodApp\app.json'
├─ readAsync C:\Users\lenovo\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\json-file\src\JsonFile.ts:158:13
├─ extractAndPrepareTemplateAppAsync C:\Users\lenovo\AppData\Roaming\npm\node_modules\expo-cli\src\commands\utils\extractTemplateAppAsync.ts:25:25
└─ actionAsync C:\Users\lenovo\AppData\Roaming\npm\node_modules\expo-cli\src\commands\initAsync.ts:287:19

Error downloading and extracting template package: Error: Could not parse JSON returned from "npm pack expo-template-blank --dry-run".

expo-template-blank-45.0.3.tgz

Error: Unexpected token e in JSON at position 0
× Something went wrong while downloading and extracting the template.

Can't read JSON file: G:\ReactNative\FoodApp\app.json

I am new to react native and don't know how to resolve this issue

like image 535
Omkar Joshi Avatar asked Dec 21 '25 15:12

Omkar Joshi


1 Answers

I have the same problem as you. The problem is that your NPM is not in the right version, if you have node 16.#.# you need to put this comand npm install -g npm it will update your npm and it will work.

like image 87
Mario Avelar Avatar answered Dec 24 '25 03:12

Mario Avelar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!