googleapis / googleapis/google-api-nodejs-client

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

Aperta
#3,077 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
priority: p3 type: question
Lingua principale
TypeScript
Stelle
12.2k
Fork
2k
Merge medio
1g 9h
PR unite (30g)
24

Descrizione

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)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the TypeScript call to gd.files.list(listParams) and the reported ERR_INVALID_ARG_TYPE stack trace. Check how the googleapis client expects list parameters and whether this example reaches the client as intended; done means the request lists folders without the TypeError.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
nodejs, typescript
Ambito
api
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.