Spago repl fails to star

I feel quite dumb, but even with a very minimal setup [1], ‘spago repl’ fails on my computer with the following error:

$ spago repl
purs repl: PSCi requires the psci-support package.
For help getting started, visit
spago: callCommand: purs repl ".spago/console/v4.3.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"  (exit 1): failed

What am I doing wrong?

Do I really have to install Bower as pointed out here?

bower install purescript-psci-support


Giulio Cesare

[1]: These are the steps I have done to setup the project:

$ nvm install --lts
Now using node v12.14.1 (npm v6.13.4)

$ npm install -g purescript
+ purescript@0.13.6
added 154 packages from 89 contributors in 6.11s

$ npm install -g spago
+ spago@0.13.1
added 57 packages from 60 contributors in 4.357s

$ spago init
[info] Set up a local Spago project.
[info] Try running `spago build`

I have tried to follow the suggestion to install ‘purescript-psci-support’ with Bower, but to no avail:

$ npm install -g bower
npm WARN deprecated bower@1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here:
+ bower@1.8.8
added 1 package from 1 contributor in 1.132s

$ bower install purescript-psci-support
bower purescript-psci-support#*       not-cached*
bower purescript-psci-support#*          resolve*
bower purescript-psci-support#*         download
bower purescript-psci-support#*          extract archive.tar.gz
bower purescript-psci-support#*         resolved
bower purescript-console#^4.0.0       not-cached^4.0.0
bower purescript-console#^4.0.0          resolve^4.0.0
bower purescript-prelude#^4.0.0           cached
bower purescript-prelude#^4.0.0         validate 4.1.0 against^4.0.0
bower purescript-effect#^2.0.0            cached
bower purescript-effect#^2.0.0          validate 2.0.1 against^2.0.0
bower purescript-console#^4.0.0         download
bower purescript-prelude#^4.0.0              new version for^4.0.0
bower purescript-prelude#^4.0.0          resolve^4.0.0
bower purescript-prelude#^4.0.0         download
bower purescript-prelude#^4.0.0          extract archive.tar.gz
bower purescript-console#^4.0.0          extract archive.tar.gz
bower purescript-console#^4.0.0         resolved
bower purescript-prelude#^4.0.0         resolved
bower purescript-psci-support#^4.0.0     install purescript-psci-support#4.0.0
bower purescript-effect#^2.0.0           install purescript-effect#2.0.1
bower purescript-console#^4.0.0          install purescript-console#4.4.0
bower purescript-prelude#^4.0.0          install purescript-prelude#4.1.1

purescript-psci-support#4.0.0 bower_components/purescript-psci-support
├── purescript-console#4.4.0
├── purescript-effect#2.0.1
└── purescript-prelude#4.1.1

purescript-effect#2.0.1 bower_components/purescript-effect
└── purescript-prelude#4.1.1

purescript-console#4.4.0 bower_components/purescript-console
├── purescript-effect#2.0.1
└── purescript-prelude#4.1.1

purescript-prelude#4.1.1 bower_components/purescript-prelude

The final outcome is unfortunately very similar. :frowning:

$ spago repl
purs repl: PSCi requires the psci-support package.
For help getting started, visit
spago: callCommand: purs repl ".spago/console/v4.3.0/src/**/*.purs" ".spago/effect/v2.0.1/src/**/*.purs" ".spago/prelude/v4.1.1/src/**/*.purs" ".spago/psci-support/v4.0.0/src/**/*.purs" "src/**/*.purs" "test/**/*.purs"  (exit 1): failed

You don’t have to install Bower - you just have to install psci-support with whichever package manager you’re using (so spago in this case). We should update that errormessage, it’s misleading.

1 Like

Indeed; I just had to add “psci-support” to the ‘dependencies’ in spago.dhall.
It feels weird, as this is not a dependency useful for the project itself, but at least I can use the repl now.


1 Like

Happy to hear this is solved! :tada:

I guess we could also check that the psci-support is installed before starting a repl. I opened an issue in Spago to track this


Having had a closer look I think that it’s not actually the error message which is misleading, but the README for the psci-support package, which only suggests Bower as an installation method. I’m sure it also doesn’t help that the guide linked in the error message,, assumes you’re using Pulp and Bower.

Perhaps we should start removing the “installation” sections on package readmes?

1 Like