aakropotkin / floco

Using Nix to put NPM and Yarn in a coffin
GNU General Public License v3.0
99 stars 4 forks source link

ambiguous error when `fetchInfo = "path:."` #51

Open DavHau opened 1 year ago

DavHau commented 1 year ago

After executing floco translat -ptj, the pdef.json file contained the following entry for the top-level package:

[...]
  "fetchInfo": "path:.",
[...]

On a nix build this leads to the following error:

error: string '<unknown-file>/.' doesn't represent an absolute path

This error isn't very helpful as it doesn't describe the problem or how to fix it.

I'd expect something along these lines:

Cannot find the source for package XXX, please define via override:
    [example for a source override]
aakropotkin commented 1 year ago

Thanks for the report I'll do some digging.

In retrospect I shouldn't have added so many layers of abstraction in those fetchers, they get hard to debug.