Unexpected end of json input что делать

На моём сайте такая ошибка в консоли браузера:

3 ответа 3

Кодировка файла utf-8

При его сохранении кодировать с флагом JSON_UNESCAPED_UNICODE

Ты делаешь explode по ";", а в массиве стоит ":"

" то так и должно быть – VIP300100 23 янв ’18 в 11:40

Всё ещё ищете ответ? Посмотрите другие вопросы с метками php javascript json php7 или задайте свой вопрос.

Похожие

Для подписки на ленту скопируйте и вставьте эту ссылку в вашу программу для чтения RSS.

дизайн сайта / логотип © 2020 Stack Exchange Inc; пользовательское содержимое попадает под действие лицензии cc by-sa 4.0 с указанием ссылки на источник. rev 2020.1.17.35809

Делаю форму регистрации и столкнулся с проблемой.
ошибка: parsererror | SyntaxError: Unexpected end of JSON input

  • Вопрос задан более двух лет назад
  • 1828 просмотров

Unexpected end of JSON input

Comments

Copy link Quote reply

reggi commented Oct 11, 2016 •

Seems that yarn is creating a json file without contents and perhaps should be <> .

This comment has been minimized.

Copy link Quote reply

knownasilya commented Oct 12, 2016

Also seeing this:

This comment has been minimized.

Copy link Quote reply

>Oct 14, 2016

We hit this at Exponent after getting a prior installation error due to a bad hash in the yarn.lock file. Current hypothesis is that a bad hash or other installation error causes Yarn to bail out and not properly clean up .yarn-metadata.json files.

This comment has been minimized.

Copy link Quote reply

markstos commented Oct 17, 2016

I triggered this condition after a failed install of lodash.isfunction :

If you trigger this, you can workaround the issue with:

Читайте также:  Winsetup dll для windows 7

Then try your install again. In my case, the re-try worked.

This comment has been minimized.

Copy link Quote reply

jkingdon commented Apr 17, 2017

We were getting this on yarn 0.22 (installed via npm). We resolved it by upgrading to yarn 0.23.1 (installed via apt) and then running yarn cache clean .

This comment has been minimized.

Copy link Quote reply

bestander commented May 23, 2017

Should be fixed now

This comment has been minimized.

Copy link Quote reply

m4v0 commented Jan 31, 2018

Set the problem with the command "native command-inactive "
After running the "yarn cache clean" command, it worked normally, thanks for the tip.

This comment has been minimized.

Copy link Quote reply

Musigwa commented Mar 5, 2018

Command failed: yarn add react-navigation@1.0.0-beta.11
error An unexpected error occurred: "/home/musigwa/.cache/yarn/v1/npm-react-native-tab-view-0.0.65-b685ea3081ff7c96486cd997361026c407302c59/.yarn-metadata.json: Unexpected end of JSON input".

i got this error while running ignite new FirstApp

This comment has been minimized.

Copy link Quote reply

Musigwa commented Mar 5, 2018

anyone to help me.

This comment has been minimized.

Copy link Quote reply

bestander commented Mar 5, 2018

@Musigwa, looks like your cache might be corrupt.
Try running yarn cache clean and then install again

This comment has been minimized.

Copy link Quote reply

Musigwa commented Mar 5, 2018

thank you i’m going to try it out

This comment has been minimized.

Copy link Quote reply

This comment has been minimized.

Copy link Quote reply

daoyi7 commented Apr 24, 2019

I triggered this condition after a failed install of lodash.isfunction :

If you trigger this, you can workaround the issue with:

Читайте также:  Nfs 2015 deluxe edition

Then try your install again. In my case, the re-try worked.

This comment has been minimized.

Copy link Quote reply

wptechprodigy commented Jun 28, 2019 •

This might help someone. perhaps, I might be needing it in the future.
It’s not uncommon in this space.

I was having this issue while trying to work on a project that required using yarn . So I ran yarn and was receiving this error message:

Problem: Corrupt cache
Solution: Clean up your cache by running yarn cache clean

This comment has been minimized.

Copy link Quote reply

MrGlaurung commented Sep 27, 2019

Don’t forget that if you get this error on windows it can be because you have an empty package.json in your home directory (C:Usersyourloginpackage.json).

If you have the empty file there just delete it and you are on track again.

This comment has been minimized.

Copy link Quote reply

malte1989 commented Nov 19, 2019

Don’t forget that if you get this error on windows it can be because you have an empty package.json in your home directory (C:Usersyourloginpackage.json).

If you have the empty file there just delete it and you are on track again.

You really saved my life! I tried all possible things and hunderts of reinstalls. 🙂

Rate this post

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *