Objective
If you attempt to update the @twilio-paste/core and @twilio-paste/icons dependencies in an existing Twilio Flex plugin by manually modifying the package.json file and running npm install, you may encounter an ERESOLVE error due to version conflicts.
This guide provides step-by-step instructions for properly updating @twilio-paste/core and @twilio-paste/icons to newer versions in a Twilio Flex plugin built with Flex UI 2.x.
Product
Twilio Flex
Procedure
1. Remove Node Modules
Navigate into the plugin directory and remove existing node_modules and package-lock.json to ensure a clean install:
1.1 macOS/Linux
cd plugin-demo rm -rf node_modules package-lock.json
1.2 Windows (Command Prompt)
cd plugin-demo rd /s /q node_modules del package-lock.json
1.3 Windows (PowerShell)
cd plugin-demo Remove-Item -Recurse -Force node_modules Remove-Item -Force package-lock.json
2. Update package.json Paste Dependencies
Open package.json and modify the following dependencies:
"@twilio-paste/core": "^18.1.0", "@twilio-paste/icons": "^10.0.0"
The dependencies section should now reflect these updated versions.
3. Reinstall Node Packages
Install all dependencies again:
npm install