When I export the configuration from the "View / Export Config" modal in the config menu on the web interface, the content sent by the application when I click "Download as File" has a leading space (i.e. 0x20) on the first column, first line of the file.
If I try to place this file at public/conf.yml without appropriate inspection (yes, I know), the build will fail because it fails to appropriately parse the section indentations from the YAML configuration.
Additional info
I am deploying Dashy from a custom template saved in Portainer. My compose file is below:
The linter (i.e. yarn validate-config) produces a decent, but somewhat indirect error:
/app/public # yarn validate-config
yarn run v1.22.5
$ node services/config-validator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Error, unable to validate 'conf.yml'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Please ensure that your config file is present, has the correct access rights and is parsable. If this warning persists, it may be an issue with the validator function. Please raise an issue, and include the following stack trace:
Stack Trace for config-validator.js:
YAMLException: end of the stream or a document separator is expected (40:1)
37 | disableUpdateChecks: false
38 | disableSmartSort: false
39 | enableErrorReporting: false
40 | pageInfo:
------^
41 | title: Dashy
42 | description: Welcome to your ...
at generateError (/app/node_modules/js-yaml/lib/loader.js:183:10)
at throwError (/app/node_modules/js-yaml/lib/loader.js:187:9)
at readDocument (/app/node_modules/js-yaml/lib/loader.js:1645:5)
at loadDocuments (/app/node_modules/js-yaml/lib/loader.js:1688:5)
at Object.load (/app/node_modules/js-yaml/lib/loader.js:1714:19)
at Object.<anonymous> (/app/services/config-validator.js:64:23)
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) {
reason: 'end of the stream or a document separator is expected',
mark: {
name: null,
buffer: ' appConfig:\n' +
' theme: one-dark\n' +
< snip >
Please tick the boxes
[X] You are using a supported version of Dashy (check the first two digits of the version number)
Environment
Self-Hosted (Docker)
Version
2.0.2
Describe the problem
When I export the configuration from the "View / Export Config" modal in the config menu on the web interface, the content sent by the application when I click "Download as File" has a leading space (i.e.
0x20
) on the first column, first line of the file.If I try to place this file at
public/conf.yml
without appropriate inspection (yes, I know), the build will fail because it fails to appropriately parse the section indentations from the YAML configuration.Additional info
I am deploying Dashy from a custom template saved in Portainer. My compose file is below:
The linter (i.e.
yarn validate-config
) produces a decent, but somewhat indirect error:Please tick the boxes