Nextcloud can not get file versions using webDav API

I am using nextcloud v14 and webdav client (npm package) to get file versions. But, I’m always getting an empty versions arrays.

First , I created an index.html file and updated it twice so I have two versions (physically stored) in:


Second , node.js code using a npm package called webDav:

var client = createClient(

    .then(function(contents) {
        console.log(JSON.stringify(contents, undefined, 4));

But, I get an empty versions array

        "filename": "/versions",
        "basename": "versions",
        "size": 0,
        "type": "directory"
        "filename": "/restore",
        "basename": "restore",
        "size": 0,
        "type": "directory"

If i changed the link to be like this{USER}/versions

I get an empty array [] as a response.

NOTE : according to nextcloud documentations for webdav versions link I should append {fileId} to the link. I’ve tried it but, it didn’t work.