googleapis / googleapis/google-api-nodejs-client

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

Open
#3,077 1 comment 0 reactions 0 assignees View on GitHub
priority: p3 type: question
Dominant language
TypeScript
Stars
12.2k
Forks
2k
Avg merge
1d 9h
Merged PRs (30d)
24

Description

Hello!

I'm trying to get a list of folders in a specific folder, using the googleapis library, it gives an error. (typescript)

const folderId:string = "1U4Zucpia-a3S2fwgBJC1omsR4-15KMm2";
const search_query: string = `${folderId} in parents and mimeType contains 'application/vnd.google-apps.folder' and trashed = false`;
const listParams: drive_v3.Params$Resource$Files$List = { q:search_query };
const res: GaxiosResponse = await gd.files.list(listParams);
const listResults: drive_v3.Schema$FileList = res.data;

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
![image](https://user-images.githubusercontent.com/114344649/192145530-ccf7f19a-7780-4d05-904b-74b657eb588e.png)
![image](https://user-images.githubusercontent.com/114344649/192145545-393934e5-76d2-4a8c-a8b3-f4c08f009a12.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.