State "install <pkg>" fails

In my Perl project, I attempted to install a module Text-Template with the ‘state install text-template@1.59’ command. A previous ‘state search’ had revealed that the module was listed.

This resulted in-
x Could not match text-template. Did you mean:

  • Text-Template
  • Text-Template
  • Text-Template
  • Text-Template
  • Text-Template
  • … (to see more results run state search text-template)
    x Bad request while resolving order: Please visit
    ActiveState to see details about
    the error: Request is invalid

Visiting the URL given did not reveal any details about the error; it just suggested creating an account.

Finding my project under my org showed the error-

Unable to Resolve Dependencies!

Here’s what happened…

Because root depends on Feature|language|perl (5.32) which doesn’t match any versions, version solving failed.

Hi Greg,

Thanks for the issue report! I will look into it and get back to you.

Cheers,

-JR

Looks like language|perl 5.32 is not a valid perl version.

So, just updating the language via state tool command state languages install perl@5.32.0 should be able to update the perl language to a valid perl version

You can also change the perl version on your project under your org via Configuration–>Language as well via platform.activestate.com

I tried the command you specified, and it errored:

d:\as\proj>state languages install perl@5.32.0
╔═════════════════════╗
║ Installing Language ║
╚═════════════════════╝

Something Went Wrong
────────────────────
x Could not find language: perl@5.32

I tried using quotes around the language specification, but that didn’t work either.

I heard back from the Dev team and looks like the command should work but isn’t at the moment, will push out a fix for it.

Meanwhile, you can try using the 2nd option I mentioned above i.e. changing the language via platform.activestate.com on your project under your org via Configuration–>Language.

Also interesting to note is that Perl packages are case-sensitive so it’s a good idea to “Add Package” via the website again and see if that resolves the project build.