Type definitions not working on VSCode for 'twilio-sync' (js/ts) version 3.0
I just recently upgraded to 'twilio-sync' v 3.0.1 and the type hints on VSCode stopped working, i.e, the default export is now the generic 'any' TS type. I switched back to 2.0.1 and it worked fine again. Do you know what else should I do in order to upgrade to v 3.0?
Answers
-
Hi @educobuci, thank you for bringing this to our attention. I have reached out to our Sync support team in hopes to get you a solution. Thank you for your patience!
-
Any updates on this? I also want to update from 2.0.1 to 3.0.1..
-
Hey @dassmario @educobuci ! Try updating to the latest version of Sync, the issue should already be resolved there.
-
Try updating to the latest version of Sync,
That's 3.0.4-rc.7 (published 22 days ago), right? Still getting errors when performing a ng build in my Angular/Typescript project.
ERROR in node_modules/twilio-sync/node_modules/twilsock/dist/lib.d.ts:363:15 - error TS2304: Cannot find name 'TwilsockImpl'. 363 channel?: TwilsockImpl;
-
Hi @dassmario , do you mind providing the following info:
1. The tsconfig.json
2. The angular version
3. (if possible) the minimal angular project which reproduces this error
4. Can they check the version of the installed Twilio-sync version? (i.e., go to ./node_modules/twilio-sync/package.json and see what version NPM fetched)You could also try removing node_modules and NPM cache and installing the newest version again.
-
@dassmario just a heads up that the issues have been fixed! The full release is expected in the next couple of weeks. I will keep you posted. ⚡️
-
Hi, I see that Twilio Sync 3.0.5 has been released. Was hoping this would fix my problems using the latest version of Twilio Sync in an angular project, buy I'm still getting errors. "npm install" now produces:
-------------------------------
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @twilio/[email protected] postinstall: `if [ -f ./dist/post-install.js ]; then node ./dist/post-install.js; fi`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @twilio/[email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
-------------------------------
Dev enviroment:
node v14.18.0
npm v6.14.15
Windows 10 Pro
-
I got this to install using -ignore-script when installing:
npm install -ignore-script [email protected]
from a similar issue here: https://community.twilio.com/community/discussion/498/twillio-conversation-javascript-sdk-2-0-0-npm-install-error
-
Glad you were able to figure it out @kmenor_cl ⚡️
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups