client.remove() produces non-existing node errors #1255
Open
Description
Environment:
- nodejs 14.x
- typescript 4.x
Hi there,
I'm currently working with managing files in remoteStorage where adding and reading files works fine. However, using the remove function produces this error and doesn't delete the file:
Cannot delete non-existing node /test-project/index.html
Cannot delete non-existing node /test-project/
Cannot delete non-existing node /
Code:
const remoteStorage = new RemoteStorage();
remoteStorage.access.claim('*', 'rw');
remoteStorage.connect('[email protected]', 'token');
remoteStorage.on('ready', () => {
console.log('remotestorage is ready');
});
remoteStorage.on('connected', () => {
const userAddress = remoteStorage.remote.userAddress;
console.debug(`${userAddress} connected their remote storage.`);
const client = remoteStorage.scope('/test-project/');
client
.remove('index.html')
.then((x) => console.log(x))
.catch((err) => console.log(err));
});