"File already exists" error when installing multiple copies of the same package external to the packages folder, ignores --force
See original GitHub issueThis issue is somewhat related to: https://github.com/fsprojects/Paket/issues/1472
When Paket installs to a path outside of the ./packages directory, I receive the error below, when multiple packages reference the same package (and all of which trying to install to the path outside of the ./packages folder)
I’ve tried using paket install -f
and paket install --hard
and paket instal -f --hard
but they all fail when trying to extract the file.
Regardless of the use case that caused this It would be nice if the force flag would overwrite files which already exist, as I would expect FORCE to do.
Paket failed with:
Error during extraction of /<path>/packages/<package group>/PackageName/PackageName.1.0.8.nupkg.
Message: Could not create file "/<path outside of packages foder>/<some file>". File already exists.
Stack Trace:
StackTrace:
at Paket.NuGetV2+ExtractPackage@356-7.Invoke (System.String message) <0x1108c52a0 + 0x0002f> in <filename unknown>:0
at Microsoft.FSharp.Core.PrintfImpl+StringPrintfEnv`1[TResult].Finalize () <0x10abe5c10 + 0x00039> in <filename unknown>:0
at Microsoft.FSharp.Core.PrintfImpl+Final4@259[TState,TResidue,TResult,A,B,C,D].Invoke (Microsoft.FSharp.Core.FSharpFunc`2 env, A a, B b, C c, D d) <0x1108c50d0 + 0x001bb> in <filename unknown>:0
at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3307-3[T2,T3,T4,T5,TResult,T1].Invoke (T2 u, T3 v, T4 w, T5 x) <0x1108c5080 + 0x00047> in <filename unknown>:0
at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3301-2[T2,T3,T4,TResult,T1].Invoke (T2 u, T3 v, T4 w) <0x1108c5030 + 0x0003d> in <filename unknown>:0
at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3266-1[T2,T3,TResult,T1].Invoke (T2 u, T3 v) <0x10f502eb0 + 0x00033> in <filename unknown>:0
at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3253[T2,TResult,T1].Invoke (T2 u) <0x10abe58a0 + 0x00029> in <filename unknown>:0
at Paket.NuGetV2+ExtractPackage@356-11.Invoke (System.String arg40) <0x1108c5000 + 0x00021> in <filename unknown>:0
at Microsoft.FSharp.Core.FSharpFunc`2[T,TResult].InvokeFast[V] (Microsoft.FSharp.Core.FSharpFunc`2 func, Microsoft.FSharp.Core.T arg1, Microsoft.FSharp.Core.TResult arg2) <0x10f3d6b80 + 0x000ad> in <filename unknown>:0
at Microsoft.FSharp.Core.FSharpFunc`2[T,TResult].InvokeFast[V,W] (Microsoft.FSharp.Core.FSharpFunc`2 func, Microsoft.FSharp.Core.T arg1, Microsoft.FSharp.Core.TResult arg2, Microsoft.FSharp.Core.V arg3) <0x1108c4d40 + 0x0016f> in <filename unknown>:0
at Microsoft.FSharp.Core.FSharpFunc`2[T,TResult].InvokeFast[V,W,X] (Microsoft.FSharp.Core.FSharpFunc`2 func, Microsoft.FSharp.Core.T arg1, Microsoft.FSharp.Core.TResult arg2, Microsoft.FSharp.Core.V arg3, Microsoft.FSharp.Core.W arg4) <0x1108c48f0 + 0x0023b> in <filename unknown>:0
at Paket.NuGetV2+ExtractPackage@349-6.Invoke (System.Exception _arg1) <0x1108c3e10 + 0x00274> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncBuilderImpl+tryWithExnA@893[a].Invoke (System.Runtime.ExceptionServices.ExceptionDispatchInfo edi) <0x1108c3c40 + 0x0003b> in <filename unknown>:0
at Microsoft.FSharp.Control.AsyncBuilderImpl+callA@851[b,a].Invoke (Microsoft.FSharp.Control.AsyncParams`1 args) <0x10f5b77b0 + 0x0015f> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () in <filename unknown>:line 0
at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a] (Microsoft.FSharp.Control.Result`1 res) in <filename unknown>:line 0
at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a] (CancellationToken token, Microsoft.FSharp.Control.FSharpAsync`1 computation, Microsoft.FSharp.Core.FSharpOption`1 timeout) in <filename unknown>:line 0
at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T] (Microsoft.FSharp.Control.FSharpAsync`1 computation, Microsoft.FSharp.Core.FSharpOption`1 timeout, Microsoft.FSharp.Core.FSharpOption`1 cancellationToken) in <filename unknown>:line 0
at Paket.InstallProcess+CreateModel@151-1.Invoke (KeyValuePair`2 kv') in <filename unknown>:line 0
at Microsoft.FSharp.Collections.IEnumerator+map@111[b,a].DoMoveNext (b& ) in <filename unknown>:line 0
at Microsoft.FSharp.Collections.IEnumerator+MapEnumerator`1[T].System-Collections-IEnumerator-MoveNext () in <filename unknown>:line 0
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@713[T,TResult] (Microsoft.FSharp.Core.CompilerServices.ConcatEnumerator`2 x, Microsoft.FSharp.Core.Unit unitVar0) in <filename unknown>:line 0
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@706[T,TResult] (Microsoft.FSharp.Core.CompilerServices.ConcatEnumerator`2 x, Microsoft.FSharp.Core.Unit unitVar0) in <filename unknown>:line 0
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@713[T,TResult] (Microsoft.FSharp.Core.CompilerServices.ConcatEnumerator`2 x, Microsoft.FSharp.Core.Unit unitVar0) in <filename unknown>:line 0
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@706[T,TResult] (Microsoft.FSharp.Core.CompilerServices.ConcatEnumerator`2 x, Microsoft.FSharp.Core.Unit unitVar0) in <filename unknown>:line 0
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@713[T,TResult] (Microsoft.FSharp.Core.CompilerServices.ConcatEnumerator`2 x, Microsoft.FSharp.Core.Unit unitVar0) in <filename unknown>:line 0
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@706[T,TResult] (Microsoft.FSharp.Core.CompilerServices.ConcatEnumerator`2 x, Microsoft.FSharp.Core.Unit unitVar0) in <filename unknown>:line 0
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers+ConcatEnumerator`2[T,TResult].System-Collections-IEnumerator-MoveNext () in <filename unknown>:line 0
at System.Collections.Generic.List`1[T]..ctor (IEnumerable`1 collection) in <filename unknown>:line 0
at Microsoft.FSharp.Collections.SeqModule.ToArray[T] (IEnumerable`1 source) in <filename unknown>:line 0
at Paket.InstallProcess.CreateModel (System.String root, Boolean force, Paket.DependenciesFile dependenciesFile, Paket.LockFile lockFile, Microsoft.FSharp.Collections.FSharpSet`1 packages) in <filename unknown>:line 0
at Paket.InstallProcess.InstallIntoProjects (Paket.InstallerOptions options, Boolean forceTouch, Paket.DependenciesFile dependenciesFile, Paket.LockFile lockFile, Microsoft.FSharp.Collections.FSharpList`1 projectsAndReferences) in <filename unknown>:line 0
at Paket.UpdateProcess.SmartInstall (Paket.DependenciesFile dependenciesFile, Paket.UpdateMode updateMode, Paket.UpdaterOptions options) in <filename unknown>:line 0
at <StartupCode$Paket-Core>.$PublicAPI+Install@164.Invoke (Microsoft.FSharp.Core.Unit unitVar0) in <filename unknown>:line 0
at Paket.Utils.RunInLockedAccessMode[a] (System.String rootFolder, Microsoft.FSharp.Core.FSharpFunc`2 action) in <filename unknown>:line 0
Issue Analytics
- State:
- Created 8 years ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
How to force install package in virtualenv? - python
I arrived at this post while looking for how to force install something in a virtualenv despite it being already installed in the...
Read more >pacman "exists on filesystem" error
From the man: Using --force will not allow overwriting a directory with a file or installing packages with conflicting files and directories.
Read more >Install and manage packages in Visual Studio using the ...
Load a project in Solution Explorer, and then select Project > Manage NuGet Packages. The NuGet Package Manager window opens. Select the Browse ......
Read more >Troubleshooting Package Installation and Update
Troubleshooting Package Installation and Update. This appendix shows how to handle some errors that you might see when you install or update packages....
Read more >conan export-pkg — conan 1.60.2 documentation
The export-pkg command let you create a package from already existing files in your working folder, it can be useful if you are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates ? I am just having this issue when I run paket convert-from-nuget.
This sounds like depending on https://github.com/snyk/zip-slip-vulnerability
You really should reconsider your workflow