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

Typings appear to be incorrect #235

Open
JoshMcCullough opened this issue Oct 3, 2023 · 1 comment
Open

Typings appear to be incorrect #235

JoshMcCullough opened this issue Oct 3, 2023 · 1 comment

Comments

@JoshMcCullough
Copy link

JoshMcCullough commented Oct 3, 2023

I get the error:

return orderedJson.parse(rawJson).object;
^
TypeError: orderedJson.parse is not a function
at readPackageJson (file:///home/josh/Projects/teslagov/clarakm/tools/2734-updater/[eval1]:256:22)
at async run (file:///home/josh/Projects/teslagov/clarakm/tools/2734-updater/[eval1]:64:25)
at async file:///home/josh/Projects/teslagov/clarakm/tools/2734-updater/[eval1]:337:1

import orderedJson from "json-order";

console.log({ imported: orderedJson, fixed: orderedJson["default"] });

Results in:

{
  imported: {
    default: {
      parse: [Function: parse],
      stringify: [Function: stringify],
      order: [Function: order]
    }
  },
  fixed: {
    parse: [Function: parse],
    stringify: [Function: stringify],
    order: [Function: order]
  }
}
@JoshMcCullough
Copy link
Author

This may be an issue with how I'm running my script -- via esrun.

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

1 participant