readme-generator-for-helm
readme-generator-for-helm copied to clipboard
A list inside a File.ext YAML key pattern is not correctly parsed
I found the following error message for a valid values YAML file
/folder/readme-generator-for-helm/lib/parser.js:147
_.get(valuesJSON, arrayPrefix).forEach((e) => {
^
TypeError: Cannot read property 'forEach' of undefined
at createValuesObject (/folder/readme-generator-for-helm/lib/parser.js:147:39)
at getParsedMetadata (/folder/readme-generator-for-helm/index.js:22:24)
at runReadmeGenerator (/folder/readme-generator-for-helm/index.js:52:28)
at Object.<anonymous> (/folder/readme-generator-for-helm/bin/index.js:22:1)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
make: *** [readme] Error 1
This is the yaml file, it contains a key with a .
because it references a file.ext
pattern, this key contains a list that is where the parse error happens.
## section foo bar
## @param foo.file.ext.foo bar
foo:
file.ext:
foo:
- bar
Removing the file.ext
key the parser pass.
In my case, I am creating a Helm Chart on top of the Grafana Helm Chart and defining a Grafana dashboardProviders
The main problem here is that it was not easy to find what caused the error.
Sorry for my very late response
I've just created an internal task to work on this issue. I hope to come back soon.
Facing same issue , sent a PR