Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install dependency "xxx" #957

Closed
Dev3124 opened this issue Apr 28, 2023 · 5 comments
Closed

Failed to install dependency "xxx" #957

Dev3124 opened this issue Apr 28, 2023 · 5 comments

Comments

@Dev3124
Copy link

Dev3124 commented Apr 28, 2023

When I am going to install a dependency, I am getting this error

$ spago repl
[info] Installing 32 dependencies.
[info] Installing "control"
[info] Installing "const"
[info] Installing "either"
[info] Installing "contravariant"
[info] Installing "distributive"
[info] Installing "bifunctors"
[info] Installing "foldable-traversable"
[info] Installing "console"
[info] Installing "arrays"
[info] Installing "functors"
[info] Installing "newtype"
[info] Installing "identity"
[info] Installing "exists"
[info] Installing "invariant"
[info] Installing "orders"
[info] Installing "lazy"
[info] Installing "nonempty"
[info] Installing "maybe"
[info] Installing "effect"
[info] Installing "lists"
[info] Installing "partial"
[info] Installing "prelude"
[info] Installing "profunctor"
[info] Installing "psci-support"
[info] Installing "safe-coerce"
[info] Installing "refs"
[info] Installing "st"
[info] Installing "tailrec"
[info] Installing "tuples"
[info] Installing "type-equality"
[info] Installing "unfoldable"
[info] Installing "unsafe-coerce"
[error]
Failed to install dependency "foldable-traversable"
Git output:

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


Aborting installation..
[error]
Failed to install dependency "foldable-traversable"
Git output:

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


Aborting installation..
[error] Installation failed
[error] Error:
[error] ExitFailure 1

I looked for some issues and documentation, but could not find the solution. I am using spago on wildows, I am not sure if the OS is the cause.

@arrowd
Copy link
Contributor

arrowd commented Jun 18, 2023

The same is happening on FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272064

@itdolmatov
Copy link

I found, that error
fatal: destination path '.' already exists and is not an empty directory.
occurs in case if git not initialized.

I found, that "spago build" somehow calls git commands, because git icon in my VS Code changes during build.
So, when i initialized git in a directory, the error went away.

Could anyone explain such behavior?

@zvodd
Copy link

zvodd commented Aug 22, 2023

I decided to try the out PureScript recently and immediately hit this roadblock.
Still have no idea why, but at least I can actually try the language now, thanks to itdolmatov's comment.

  • Spago fails to install dependencies on windows unless the folder is an initialised git repo ala git init

Maybe a quick fix would be to have Spago initialise a git repo if .git folder is missing?
Or could throw an informative error message that instructs users to initialise a git repository.
This would really reduce friction.

@f-f
Copy link
Member

f-f commented Sep 20, 2023

We have Windows CI that shows that we can indeed install packages even if the folder is not a git repo.
Spago has been rewritten in PureScript now - you can install it via npm install -g spago@next, so I wonder if you'd get the same error even with the new spago?
I'll close this for now, let's reopen if we find out that the new Spago has the same issue.

@f-f f-f closed this as completed Sep 20, 2023
@RedGlow
Copy link

RedGlow commented Jan 20, 2024

Had the same blocker with standard spago, and the problem does not pop up with spago@next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants