paazmaya / yaml-validator

Validate Yaml files and enforce a given structure
MIT License
55 stars 17 forks source link

TypeError on run #20

Open lucasjohnston opened 5 years ago

lucasjohnston commented 5 years ago

Expected behaviour

Should have validated yaml file.

Actual behaviour

/usr/local/lib/node_modules/yaml-validator/index.js:129
    const lineNumber = error.message.match(/line (\d+)/)[1];
                                                        ^

TypeError: Cannot read property '1' of null
    at YamlValidatore.loadData (/usr/local/lib/node_modules/yaml-validator/index.js:129:57)
    at YamlValidatore.loadFile (/usr/local/lib/node_modules/yaml-validator/index.js:158:15)
    at YamlValidatore.checkFile (/usr/local/lib/node_modules/yaml-validator/index.js:167:20)
    at mapFiles (/usr/local/lib/node_modules/yaml-validator/index.js:201:18)
    at Array.map (<anonymous>)
    at YamlValidatore.validate (/usr/local/lib/node_modules/yaml-validator/index.js:200:34)
    at Object.<anonymous> (/usr/local/lib/node_modules/yaml-validator/bin/yaml-validator.js:112:11)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)

Versions and environment

paazmaya commented 5 years ago

How does the command for getting this looks like and against what kind of a file?