What is the spago equivalent of yarn remove or npm uninstall?
Is there no way to remove packages as with Haskell stack? If so, what are the steps to remove a package manually?
What is the spago equivalent of yarn remove or npm uninstall?
Is there no way to remove packages as with Haskell stack? If so, what are the steps to remove a package manually?
Just remove the package make from
spago.dhall, that's it.npmhas to have a special command for this, becausenodedoesn't care what's inpackage.json, it will pick up any packages that are innode_modules. This means thatnpm uninstallhas to remove the package frompackage.json, but then also delete it fromnode_modules, was well as all its dependencies.Spago, on the other hand, doesn't need to do this, because
spago.dhallis the single source of truth. Even if the package files are present inside the.spagodirectory, they will not be used in compilation unless the package is also mentioned inspago.dhallThis also works the other way around: if you just add a package to
spago.dhall, Spago will automatically download it next time you run any Spago command.