Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error using export function #3

Open
manuelf18 opened this issue Sep 29, 2020 · 1 comment · May be fixed by #4
Open

error using export function #3

manuelf18 opened this issue Sep 29, 2020 · 1 comment · May be fixed by #4

Comments

@manuelf18
Copy link

I'm getting this error while using the exportAssistant function:

[ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object

and then

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of NodeError

@manuelf18
Copy link
Author

manuelf18 commented Sep 29, 2020

The issue starts in

const filename = await files.createAssistantJSONFile(assistant.uniqueName, recoverSchema);

I believe this is failing because
await fs.writeFileSync(path.join(process.cwd(),`${filename}.json`),{});

requires a string instead of an object

@manuelf18 manuelf18 linked a pull request Sep 29, 2020 that will close this issue
Mohammad-Khalid added a commit that referenced this issue Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant