Unexpected token in JSON at position 0 SyntaxError:Unexpected token in JSON at position 0


#1

When I tried with “tns platform remove android” command it is giving me above error.I am not able to do anything.Please Suggest something.
my console is as following when I fire command “tns platform remove android”

SyntaxError: Unexpected token in JSON at position 0
at FiberFuture.wait (C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\native
script\node_modules\fibers\future.js:566:15)
at fiber (C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\nativescript\lib
nativescript-cli.js:21:45)
- - - - -
at Object.parse (native)
at FileSystem.readJson (C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\nat
ivescript\lib\common\file-system.js:156:25)
at C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\nativescript\lib\common
services\user-settings-service.js:45:50
at Function.settle (C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\natives
cript\node_modules\fibers\future.js:249:26)
at FiberFuture.wait (C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\native
script\node_modules\fibers\future.js:565:10)
at C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\nativescript\lib\common
services\user-settings-service.js:11:41
at Function.settle (C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\natives
cript\node_modules\fibers\future.js:249:26)
at FiberFuture.wait (C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\native
script\node_modules\fibers\future.js:565:10)
at C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\nativescript\lib\common
services\analytics-service-base.js:140:91
at Function.settle (C:\Users\AKSHAY\AppData\Roaming\npm\node_modules\natives
cript\node_modules\fibers\future.js:249:26)
Error while reporting exception: SyntaxError: Unexpected token in JSON at posi
tion 0

Please sugest something


#2

What version of the nativescript CLI is this? Have you tried reinstalling the package globally? npm remove nativescript -g npm i nativescript -g