Hi,
First of all, just to clarify what our goal is:
We want to set in package.json which app, title and app the dashpub app should load. This is a first step to containerizing it and set these parameters through environment variables.
When doing dashpub update in the oct-23 branch we see that the generateDashboards/generate function is broken.
We did the following:
- Installed from branch
oct-23.
- Built a working dashboard using
dashpub init. Tested with yarn dev.
- Cloned project directory and edited
package.json to change to a different dashboard.
dashpub update. Resulted in the following errors:
TypeError: generateDashboards is not a function
at main (/home/user/node_modules/@splunk/dashpub/cli/cli.js:40:15)
- We work around this by uncommenting this line:
- The next error is:
Generating undefined dashboards...
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (node:internal/validators:162:11)
at Object.join (node:path:1175:7)
at generate (/home/user/node_modules/@splunk/dashpub/cli/builddash.js:93:23)
at generateDashboards (/home/user/node_modules/@splunk/dashpub/cli/init.js:50:11)
at main (/home/user/node_modules/@splunk/dashpub/cli/cli.js:40:15) {
code: 'ERR_INVALID_ARG_TYPE'
}
- Which is worked around by hardcoding the app name here:
|
await generateDashboards(project.dashboards, splunkdInfo, process.cwd()); |
- We changed this to the following, which resulted in
dashpub update working again:
await generateDashboards('ourappname', project.dashboards, splunkdInfo, process.cwd());
Hi,
First of all, just to clarify what our goal is:
We want to set in package.json which app, title and app the dashpub app should load. This is a first step to containerizing it and set these parameters through environment variables.
When doing
dashpub updatein the oct-23 branch we see that the generateDashboards/generate function is broken.We did the following:
oct-23.dashpub init. Tested with yarn dev.package.jsonto change to a different dashboard.dashpub update. Resulted in the following errors:dashpub/cli/init.js
Line 114 in b929e78
dashpub/cli/cli.js
Line 40 in b929e78
dashpub updateworking again: