ballerinawso2-bi

Ballerina wso2/gmail package : unable to import


I want to import wso2/gmail package to my ballerina project.

import wso2/gmail;

But when I try to import the package to my , I get the following error.

ballerina pull wso2/gmail

your ballerina version does not support for package: wso2/gmail:*. following versions are supported: 0.9.6

My ballerina version is 0.981.1 However according to https://central.ballerina.io/wso2/gmail and https://github.com/wso2-ballerina/package-gmail ballerina 0.982.0 is also supported. Is there a way to import the latest wso2/gmail 0.9.7 which is compatible with ballerina 0.981.0.

p.s: My requirement is use gmail-connector and send an email notification. Feel free to suggest if there is a better approach.


Solution

  • ballerina pull wso2/gmail attempts to pull the latest package from central. wso2/gmail 0.9.7 version is only compatible with 0.982.0 ballerina distribution.

    Since you have 0.981.0 ballerina version, you can pull 0.9.6 version using ballerina pull wso2/gmail:0.9.6.

    Other option is to upgrade to ballerina 0.982.0 version which as of now is an RC version - https://ballerina.io/downloads/ (https://product-dist.ballerina.io/dev/0.982.0-rc1/ballerina-platform-0.982.0-rc1.zip)

    You cannot use wso2/gmail 0.9.7 with ballerina 0.981.0.