Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gregmagolan opened this issue Jun 2, 2022 · 2 comments
Closed

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

gregmagolan opened this issue Jun 2, 2022 · 2 comments

Comments

@gregmagolan
Copy link

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"
@gregmagolan gregmagolan changed the title Duplicate "typeCoverage" keys in package.json files Duplicate "typeCoverage" keys in package.json file Jun 2, 2022
@wooorm wooorm closed this as completed in e6e9e3c Jun 2, 2022
@wooorm
Copy link
Owner

wooorm commented Jun 2, 2022

Released. This is a bug in Bazel though.

@alexeagle
Copy link

@wooorm I agree - filed bazelbuild/bazel#15605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants