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

Property 'remove' does not exist on type 'Client' #1246

Closed
Phoeni0x opened this issue Dec 28, 2023 · 1 comment · Fixed by #1248
Closed

Property 'remove' does not exist on type 'Client' #1246

Phoeni0x opened this issue Dec 28, 2023 · 1 comment · Fixed by #1248

Comments

@Phoeni0x
Copy link

Phoeni0x commented Dec 28, 2023

Trying to remove a single CID found remove() is not on client. I was following this: https://web3.storage/docs/how-to/remove/#using-the-js-client-or-cli

Here is a code snippet:

    import * as Client from '@web3-storage/w3up-client'
    
    async function main() {
        const [,,accountEmail, cidToRemove] = process.argv
        console.log("About to Remove CID: ", cidToRemove)
        const client = await Client.create()
        await client.login(accountEmail)
        client.remove(cidToRemove, { shards: true })
       console.log("Done!")
    }

but on client.remove(cidToRemove, { shards: true }) I get Property 'remove' does not exist on type 'Client'.ts(2339).

What am I doing wrong here? which should be the correct implementation to remove a single CID? Thx!!

@vasco-santos
Copy link
Contributor

Hi @Phoeni0x

Thanks for the report, I put a PR together for a fix that you can follow #1248

In the meantime, for deleting you can use the w3cli which should be functional

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.

2 participants