Skip to content

Duplicate "typeCoverage" keys in package.json file #11

Description

@gregmagolan

This causes parsing issues with strict JSON parsers such as Bazel's used in rules_js https://github.com/aspect-build/rules_js/blob/dacb4c58dbca319b0a1e58a426dc7bbd39c76e56/js/private/npm_import.bzl#L274:

ERROR: /home/alexeagle/Projects/bazel-examples/next.js/WORKSPACE.bazel:30:17: fetching npm_import rule //external:npm__stringify-entities__4.0.2: Traceback (most recent call last):
        File "/home/alexeagle/.cache/bazel/_bazel_alexeagle/1112fa9a04c6878cb3f2bf123baf106a/external/aspect_rules_js/js/private/npm_import.bzl", line 274, column 27, in _impl
                pkg_json = json.decode(rctx.read(pkg_json_path))
Error in decode: at offset 2312, object has duplicate key: "typeCoverage"

Activity

  1. changed the title [-]Duplicate "typeCoverage" keys in package.json files[/-] [+]Duplicate "typeCoverage" keys in package.json file[/+] on Jun 2, 2022
  2. wooorm commented on Jun 2, 2022

    @wooorm
    Owner

    Released. This is a bug in Bazel though.

  3. alexeagle commented on Jun 2, 2022

    @alexeagle
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions