node2nix icon indicating copy to clipboard operation
node2nix copied to clipboard

unclear how to use with Elixir/Pheonix projects

Open brianmay opened this issue 2 years ago • 1 comments

Elixir projects typically have a package.json file that contains the following:

{
  [...]
  "dependencies": {
   [...]
    "phoenix": "file:../deps/phoenix",
    "phoenix_html": "file:../deps/phoenix_html",
    "phoenix_live_view": "file:../deps/phoenix_live_view"
  },
  [...]
}

This was recommended practise in fact. Due to the fact these dependencies need to be the same versions of the dependencies already downloaded by mix.

But this breaks badly when trying to build with node2nix:

error: getting status of '/nix/store/8mdp84lpjdh3h1isgipk1258d999zw82-source/deps': No such file or directory

I think this means that the deps folder is not accessible. And probably this is a good thing. Because those files could be stale, and not part of the build.

As far as I can tell, there is no way of overriding the important bits so npm can find the files.

So not sure how to solve this...

brianmay avatar Nov 23 '23 05:11 brianmay

I've also been bitten by this. As a quick workaround, I decided to vendor the dependencies and add them to my git repository, but I'd be really interested in a better fix.

Munksgaard avatar Apr 17 '24 08:04 Munksgaard