invalid 'org' under [package]: 'org' can only contain alphanumerics and underscores

{tocify} $title={Table of Contents}


Error


Got below error while running the first demo project using Ballerina Integration



invalid 'org' under [package]: 'org' can only contain alphanumerics and underscores



What is Ballerina?


Ballerina is a programming language made for connecting systems and APIs. It helps developers build cloud-based apps and integrations quickly.

And one important file in a Ballerina project is called Ballerina.toml. This file holds some basic information about your project — kind of like an ID card for your code.



Why it happened


What it's really saying is that, the name you gave your organization (in the project file) has characters I don't allow!


Invalid Value in Org Ballerina Project


The value "Maheshkumar Tiwari" has a space ( ) in it. Ballerina doesn’t like that. The org name can only contain letters, numbers, and underscores (_). No dashes, dots, or spaces!


What to do 

Just go into your Ballerina.toml file and change the org value to something that only uses:

  • Letters (A to Z, a to z)
  • Numbers (0 to 9)
  • Underscores (_)



corrected org in ballerina Toml file


Bad (will cause error):

org = "my-company"
org = "my.company"
org = "my company"



Good (will work just fine):

org = "mycompany"
org = "my_company"



Post a Comment

If you have any suggestions or questions or want to share something then please drop a comment

Previous Post Next Post