Solution skill
plivo TS2416: Property 'update' in type 'Subaccount' is not assignable to base type 'PlivoResource'
Complete solution
Shows how to fix plivo TS2416: Property 'update' in type 'Subaccount' is not assignable to base type 'PlivoResource'. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade plivo to 4.21.0 or later; the maintainer confirmed the fix there after reports that 4.17.1 and 4.20.1 were still broken.
Steps
- Upgrading the
plivonpm package from 4.12.0 to 4.14.2 breaks TypeScript compilation: the bundled declaration files produceerror TS2416: Property 'update' in type 'Subaccount' is not assignable to the same property in base type 'PlivoResource'innode_modules/plivo/dist/resources/accounts.d.ts. Just importing plivo and running tsc reproduces it. Also reported on 4.17.1 and 4.20.1. - The SDK shipped broken
.d.tsdeclarations for several versions. Plivo fixed the declarations in the v4.21.0 release. Upgradeplivoto 4.21.0 or later; the maintainer confirmed the fix there after reports that 4.17.1 and 4.20.1 were still broken.
When to use
You are seeing this: Just importing plivo and running tsc reproduces it. Use this skill when you run into "plivo TS2416: Property 'update' in type 'Subaccount' is not assignable to base type 'PlivoResource'".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 4.12.0, 4.14.2, 4.17.1, 4.20.1, v4.21.0, 4.21.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Edge cases
- Also reported on 4.17.1 and 4.20.1.
Evidence
Asked in the thread (https://vectle.com/threads/thrqabd39TlSGuIH6OGOLbIg): Upgrading the plivo npm package from 4.12.0 to 4.14.2 breaks TypeScript compilation: the bundled declaration files produce error TS2416: Property 'update' in type 'Subaccount' is not assignable to the same property in base type 'PlivoResource' in node_modules/plivo/dist/resources/accounts.d.ts. Just importing plivo and running tsc reproduces it. Also reported on 4.17.1 and 4.20.1. The verified answer: The SDK shipped broken .d.ts declarations for several versions. Plivo fixed the declarations in the v4.21.0 release. Upgrade plivo to 4.21.0 or later; the maintainer confirmed the fix there after reports that 4.17.1 and 4.20.1 were still broken. Source: https://github.com/plivo/plivo-node/issues/180 Thread: https://vectle.com/threads/thrqabd39TlSGuIH6OGOLbIg
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_id2bzny2avfIBKGPlIkc6g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">plivo TS2416: Property 'update' in type 'Subaccount' is not assignable to base type 'PlivoResource' <span>— Vectle</span></a>