question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`paket install` fails due to JSON parsing error

See original GitHub issue

Description

Please see repro steps.

Repro steps

Locate paket.exe (from Paket latest release). Then run these commands:

paket init
echo github vain0/abdata >> paket.dependencies
paket install

(Note at 2016/May/24 07:55 JST: I use an alias that “paket=.paket\paket.exe”. So please read them as .paket\paket.exe init and .paket\paket.exe install.)

And I got this error:

Paket failed with:
        After parsing a value an unexpected character was encountered: s. Path 'files[7].patch', line 1, position 10814.

Known workarounds

github vain0/hsp_green also invoked a similar error. Then I put paket.dependencies next to “src/all.hsp” (a file in the repository) and rewrite my paket.dependencies like this.

github vain0/hsp_green src/all.hsp

Then paket first fetches “src/all.hsp”, and then it fetches all files in the repository due to the transitive dependency written in that paket.dependencies.

Other cases

  • Failure cases:
    • github/zeo_five_hsp (contains no files related to Paket)
      • Error message: Bad JSON escape sequence: \・. Path ‘files[9].patch’, line 1, position 3 5330.
    • github/speed_fs (contains paket.dependencies in the root)
      • Error message: After parsing a value an unexpected character was encountered: s. Path ‘files[0].patch’, line 1, position 5073.
  • Success cases:
    • github vain0/git_edit (which contains no files related to paket), ``github vain0/rss_reader_fs` (which contains paket.dependencies), etc

Related information

  • Windows 10
  • .NET framework 4.6
  • Paket 2.65.2.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
smoothdevelopercommented, May 24, 2016

https://twitter.com/harrisj/status/734857735393714176

When do you talk to your children about character encodings?

0reactions
forkicommented, May 24, 2016

great work. thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - npm "failed to parse json"
Mostly, this error is due to a syntax error in package.json file. ... while run npm install , first run npm package.json to...
Read more >
JSON encoder and decoder — Python 3.11.4 documentation
Be cautious when parsing JSON data from untrusted sources. A malicious JSON string may cause the decoder to consume considerable CPU and memory...
Read more >
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159. The mapping between JSON and Go values is described in...
Read more >
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
SyntaxError: JSON.parse: bad parsing. The JavaScript exceptions thrown by JSON.parse() occur when string failed to be parsed as JSON.
Read more >
body-parser
Returns middleware that only parses json and only looks at requests where the Content-Type header matches the type option. This parser ...
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