Asked 10 - hours , 45 - minutes ago
11 Nov 2017
Views 69

denyy posted

Error : Failed to parse json for Electron Js

i got the error when i try to run electron

npm ERR! file D:\node\electron\package.json
npm ERR! Failed to parse json
 pm ERR! Unexpected token ? in JSON at position 0 while parsing near '??
npm ERR!  '
npm ERR! File: D:\test\node\electron\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AppData\Roaming\npm-cache\_logs\2017-11-12T01_20_56_

so how to solve Failed to parse json for Electron js
Mitul Dabhi

Mitul Dabhi
answered Dec 12 '17 20:17

npm cache clean

clean cache .it should work
Edit Answer
no its not working for me .npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force. - denyy  
Nov 11 '17 18:40
use npm cache clean --force , in that case - Mitul Dabhi  
Nov 11 '17 18:41
npm cache clean --force also not working . same error again - denyy  
Nov 11 '17 18:43
Post Answer