Failed to parse JSON file.

See original GitHub issue

Describe the bug

parse json fail

Reproduction

https://github.com/zhenzhenChange/vite-parse-json-fail.git

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (6) x64 Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz
    Memory: 6.55 GB / 15.86 GB
  Binaries:
    Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (102.0.1245.41)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @vitejs/plugin-react: ^1.3.0 => 1.3.2
    vite: ^2.9.9 => 2.9.12

Used Package Manager

pnpm

Logs

Just run the project

Validations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zhenzhenChangecommented, Jun 16, 2022

By the way, the logic extraction in #3171 is used as a general method.

1reaction
zhenzhenChangecommented, Jun 16, 2022

Wow, ok, thank you, I can do this job and launch a pr right after work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm "failed to parse json" - Stack Overflow
Try to open your txt editor and select "plain text" for the package.json then re-save.
Read more >
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >
Error Failed to parse json-This is not a bug in npm - Edureka
When I'm trying to install express with npm I always get the following error: Failed to parse json No data, empty input at...
Read more >
Failed to parse json data? | Apple Developer Forums
use JSONDecoder().decode. to parse data. {"aaa": "value", "bbb": 1}. it generated error: Unexpected error: dataCorrupted(Swift.DecodingError.
Read more >
fail to parse the json file error - Talend Community
for the parsing JSON files: Scenario 1: Extracting JSON data from a file using JSONPath without setting a loop node from https://help.talend.com ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found