Closed Bruno-Marley closed 4 years ago
I think it may be my mistake, but if it is I hope someone knows how to help me I'm using the npm package package-json-validator in a nodejs script and when I run the code it gives an error sayingPJV.validate is not a function
package-json-validator
PJV.validate is not a function
My script:
var PJV = require("package-json-validator").PJV; const data = "{ "name": "test", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "package-json-validator": "^0.6.3" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }"; PJV.validate(data, "npm", { warnings: true, // show warnings recommendations: true // show recommendations })
var PJV = require("package-json-validator").PJV;
const data = "{ "name": "test", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "package-json-validator": "^0.6.3" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }";
PJV.validate(data, "npm", { warnings: true, // show warnings recommendations: true // show recommendations })
I think it may be my mistake, but if it is I hope someone knows how to help me I'm using the npm package
package-json-validator
in a nodejs script and when I run the code it gives an error sayingPJV.validate is not a function
My script: