Skip to content

Unable to parse packages.json: Error in $: not enough input. (solution proposed) #157

Closed
@davedawkins

Description

@davedawkins

Windows 10, latest psc-package, latest npm, etc.
Can be reproduced by:

$ git clone https://github.com/dwhitney/purescript-book.git
$ cd purescript-book/exercises/chapter03
$ psc-package install
Unable to parse packages.json: Error in $: not enough input.

I found that removing the \r from packages.json would fix it.

I then decided to try and debug psc-package. Eventually I found that updating to lts-14.1 (and aeson-pretty to 0.8.8) fixes the issue (without having to strip \r).

I'm a git noob and don't yet know how to create a pull request. The only file that needs changing is stack.yaml:

resolver: lts-14.1
packages:
- '.'
extra-deps:
- aeson-pretty-0.8.8 # newer in lts-14.1 needed for formatting packages.json

If you want, I'll try to create a PR, but let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions