Unable to get Purescript by Example first example running

I create a directory and run “pulp init” in it. I type “bower update” and a number of libraries are updated. I type “pulp build” or “pulp run” and I get an error about missing Control.Monad.Eff.Console. I type “bower install purescript-eff” and I get an message telling me that it can’t find a suitable version for purescript-prelude. No matter what I choose at that point, I get compilation errors in what follows.

I should add that this was after updating purs to 0.12. But with purs of 0.11, I get a different problem when I run “pulp init” and “pulp build”, which is unable to parse Support.purs due to an “else”.

Have you tried to ‘npm update pulp’ ?

I am trying to use psc-package (instead of bower), but I still had to npm update core tools after having updated purescript from 0.11 to 0.12.

I tried that but didn’t understand the result.

Typing ‘npm update pulp’ does nothing. typing ‘pulp --version’ says 12.0.0

My system reports this:
$ pulp --version
Pulp version 12.2.0
purs version 0.12.0

It seems you are a little bit behind with your version of Pulp. Not sure how to update it other than through npm update, though. :frowning:

I think this issue here is that pulp is out of date and pulp init is generating a project that is only compatible with PureScript 0.11

Using the latest version should create a project skeleton that is compatible with the 0.12 version of the compiler this uses Effect.

If pulp was installed globally then the command to update it would be npm update -g pulp.

I got npm to update pulp with

npm i -g pulp

I have yet to try ‘pulp init’ but will do that shortly.

Yes, it works fine now. There’s some kind of distinction between ‘npm install’ and ‘npm update’ but I’m not sure why it mattered in this case.