Dan Black
Dan Black

Reputation: 21

tns preview doesn't work doe to unexpected token

Project successfully prepared (ios) Start sending initial files for device iPhone. Successfully sent initial files for device iPhone. SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at PreviewSdkService. (/usr/local/lib/node_modules/nativescript/lib/services/livesync/playground/preview-sdk-service.js:100:43) at Generator.next () at fulfilled (/usr/local/lib/node_modules/nativescript/lib/services/livesync/playground/preview-sdk-service.js:4:58) at processTicksAndRejections (internal/process/task_queues.js:97:5)

Upvotes: 2

Views: 417

Answers (2)

Mahony Production
Mahony Production

Reputation: 76

hey i have exact the same error on same position in preview-sdk-service.js i reinstalled everything with no errors but still the same. i contacted the support, when i get an answer i will let you know. i have also problems with playground today it will not load correctly on my device. btw yesterday it worked like a charm.

---------SUPPORT ANSWER--------------

"we are migrating the auth to use Firebase and looks like couple things are still propagating. An engineer is working on this and should be resolved by Monday"

so its not a user mistake and we can just wait and hope they can fix it quickly.

Upvotes: 2

Martijn
Martijn

Reputation: 28

I'm running into this exact issue at the moment. Even started a new template using the Angular CLI command:

ng new --collection=@nativescript/schematics my-mobile-app

From the site:

Angular CLI support

The initial template seem to work but after adding some custom modules this started happening. Running on a Android Virtual Device works.

I've been looking for a solution and the issues seems to ga back as far as 2018 so i'm not sure if this is even een NativeScript issues of a dev environment issues not being setup correctly.

Upvotes: 0

Related Questions