It’s easier to provide help if you show a minimal working example. This post has some helpful tips: Please read: make it easier to help you
The solution
key got added in v0.18 of PowerModels.jl, PowerModels v0.18.0 by ccoffrin · Pull Request #768 · lanl-ansi/PowerModels.jl · GitHub, so I suggest you update your code.