I'm getting Error 20001 when I try to delete a function from a previous build.
Steps to reproduce error:
twilio serverless:init my-project
twilio serverless:deploy
rm functions/private-message.js /functions/sms/reply.protected.js /assets/style.css /assets/message.private.js /assets/index.html
twilio serverless:deploy
twilio api:serverless:v1:services:functions:list --service-sid ZSXXXXXXXXXXXXXXXX
twilio api:serverless:v1:services:functions:remove \
--service-sid ZSXXXXXXXXXXXXXXXX \
--sid ZHXXXXXXXXXXXXXXXX
After last command I'm getting this error:
» Error code 20001 from Twilio: Cannot delete function. One or more of its versions is referenced in a Build.. See https://www.twilio.com/docs/errors/20001 for more info
If I enter "Twilio Console > Functions and Assets > Services", then:
- Clicking on the Service's Unique Name, I see removed functions in grey (not green). I'm expecting not to see these functions listed.
- Clicking on Service Details (screen with title "Live Build Details"), removed functions are not listed. So there not should be an active build referencing those functions.
How should I proceed to completely delete these functions from the service?