Tanmay Bairagi
Tanmay Bairagi

Reputation: 624

TypeError: JSON5.parse is not a function

I have installed JSON5 by npm install -d -g json5 and trying to parse the json string. But it is showing me [[object Object]]JSON5.parse is not a function. What the problem actually here is? and how we can resolve this? I am using the following code-

const JSON5 = require("json5")
var jsonV = JSON5.parse(fileStr)

Thanks!

Upvotes: 1

Views: 999

Answers (0)

Related Questions