How to install purescript-bignumber with spago

Purescript Beginner Here

I can’t seem to be able to install purescript-bignumber from pursuit using the command

yarn spago install purescript-bignumber

I seem to be getting an error as so:

[error] The following packages do not exist in your package set:
[error]   - purescript-bignumber
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

but installing halogen works well.

I also tried this but it didn’t work

let additions = {
    purescript-bignumber = {
        repo = "https://github.com/athanclark/purescript-bignumber.git",
        version = "63a9ce8e03d6179555bcf402df8f6e638d15148e",
        dependencies = [
            "purescript-exceptions",
            "purescript-tuples-native",
            "purescript-either",
            "purescript-row-extra",
            "purescript-integers",
            "purescript-prelude",
            "purescript-generics-rep",
            "purescript-functions"
        ]
    }
}

and commented out the let additions = {=} at the bottom.

Thanks in advance.

Version should be the tag version so it should work if you replace your version line with
version = "v1.0.1",
which seems to be the last.

Thanks.

I was able to make the change then ran

yarn spago install 

which complete successfully:

[info] Installation complete.
Done in 0.48s.

But when I perform yarn spago ls deps I can’t find Data.BigNumber anywhere which is exported by purescript-bignumber

I also cannot use Data.BigNumber the error I get when I run yarn spago build is:

  Module Data.BigNumber was not found.
  Make sure the source file exists, and that it has been provided as an input to the compiler.

Have you tried running
spago install big-numbers
in order to update the spago.dhall file ? The modification you made earlier only tells spago where to find the sources. You need to tell it to use it now.

Thank you the command yarn spago install purescript-bignumber worked.

[info] Installing 32 dependencies.
[info] Searching for packages cache metadata..
[info] Recent packages cache metadata found, using it..
[info] Copying from global cache: "bifunctors"
[info] Copying from global cache: "foldable-traversable"
[info] Copying from global cache: "control"
[info] Copying from global cache: "identity"
[info] Copying from global cache: "functions"
[info] Copying from global cache: "integers"
[info] Copying from global cache: "enums"
[info] Copying from global cache: "invariant"
[info] Copying from global cache: "math"
[info] Copying from global cache: "either"
[info] Copying from global cache: "gen"
[info] Copying from global cache: "generics-rep"
[info] Copying from global cache: "distributive"
[info] Copying from global cache: "newtype"
[info] Copying from global cache: "partial"
[info] Copying from global cache: "nonempty"
[info] Copying from global cache: "maybe"
[info] Copying from global cache: "orders"
[info] Copying from global cache: "globals"
[info] Copying from global cache: "exceptions"
[info] Copying from global cache: "refs"
[info] Copying from global cache: "tailrec"
[info] Copying from global cache: "proxy"
[info] Copying from global cache: "tuples"
[info] Copying from global cache: "type-equality"
[info] Copying from global cache: "typelevel-prelude"
[info] Copying from global cache: "unfoldable"
[info] Copying from global cache: "unsafe-coerce"
[info] Installing "purescript-bignumber"
[info] Installing and globally caching "typelevel"
[info] Installing and globally caching "row-extra"
[info] Installing and globally caching "tuples-native"
[info] Installation complete.
Done in 4.04s.

Spago doesn’t require the purescript- prefix in front of package names (unlike Bower). So, usually you would use yarn spago install bignumber. Also, if you were adding it to the package set, you wouldn’t use purescript-bignumber. Rather, you’d use bignumber.

1 Like

Thanks, I will change it.

1 Like