Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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