Trouble installing dependencies

I’m new to purescript and have been reading about functional programming for a while, wanted to take a deep into a more strict functional language and given that i mainly work on javascript purescript is a good fit.

I’ve created a demo project to practice and did the initial setup:

npm install -g purescript
npm install -g spago
spago init
spago build

First run it goes fine, it installs dependencies without problem, added the arrays package and all.
Later i wanted to add parcel to raise a dev server and test the compiled js code, since there was no package.json i did:

npm init
npm install -D parcel-bundler

After that i’m unable to run spago build nor install additional dependencies. Console outputs a list of dependencies that were installed previously and any new dependencies and dependencies’ dependencies are throwing errors on git:

[info] Installing "web-storage"
[error] 
Failed to install dependency "lazy"
Git output:

fatal: destination path '.' already exists and is not an empty directory.

What am i doing wrong?

1 Like

Hello and welcome to PureScript and this community :heart:

From what you write it’s not obvious to me what went wrong either.
Do you get this error with npm install or when doing spago xyz?

Can you maybe post a ls of your folder?

1 Like

I didn’t expect to get a reply so soon so i posted and went to sleep. I don’t have spare time right now since I’m at work but i will reply back a few hours from now with a minimal and reliable way to reproduce my error.

1 Like

take your time - I was just getting up and am almost done with work for today :wink:

1 Like

Small aside, if you’re npm install -D'ing for parcel-bundler in a project, you should do the same for PureScript and Spago so your versions are pinned locally instead of globally where your project can’t control it (or where you may forget to update it).

1 Like