admin管理员组文章数量:1302870
I'm following the course on Integration with Ballerina. I'm trying to create a mysql connection on a bal file, but I get an "undefined module" error. Mysql is not being suggested as shown in the screenshot. Have I missed to add something? Do I need to add an entry for MYSQL into the toml file?
I tried to add - import ballerinax/mysql; - it gives an error saying cannot resolve module 'ballerinax/mysql'
I'm following the course on Integration with Ballerina. I'm trying to create a mysql connection on a bal file, but I get an "undefined module" error. Mysql is not being suggested as shown in the screenshot. Have I missed to add something? Do I need to add an entry for MYSQL into the toml file?
I tried to add - import ballerinax/mysql; - it gives an error saying cannot resolve module 'ballerinax/mysql'
Share edited Feb 11 at 11:11 Yumna Albar asked Feb 11 at 9:36 Yumna AlbarYumna Albar 1491 gold badge2 silver badges6 bronze badges 02 Answers
Reset to default 1Only the packages in the local central repository are shown as a suggestion in the VS code. Since you did not pulled this package yet, you are not getting the suggestions. You could try the following approaches:
- Manually pull the package using the following command and restart the VSCode
bal pull ballerinax/mysql
- Simply add the import statement. This will show an
unresolved module
error if the package is not pulled before. You can click on theQuick Fix
in the VSCode to pull the package
import ballerinax/mysql;
This error occurs because you haven't added the import statement.
import ballerinax/mysql;
本文标签: mysqlUndefined Module MyslBallerinaStack Overflow
版权声明:本文标题:mysql - Undefined Module Mysl - Ballerina - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741667585a2391405.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论