-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
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.jsonto 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:
Line 114 in b929e78
//generateDashboards, - 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:
Line 40 in b929e78
await generateDashboards(project.dashboards, splunkdInfo, process.cwd()); - We changed this to the following, which resulted in
dashpub updateworking again:
await generateDashboards('ourappname', project.dashboards, splunkdInfo, process.cwd());
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels