-
-
Notifications
You must be signed in to change notification settings - Fork 31
generated file is incomplete #21
Comments
@AladdiX I saw this same behavior... It turned out it was a typo for me, I had |
I have the same problem with the package.json from popcorntime. This is with npm2nix 5.12.0 from nixpkgs. |
Yes, thats probably because of the changes in npm format, which now supports something like github:owner/repo and similar ways to specifiy git/github repos. I will have to fix npm2nix soon, because we also depend on it. And yeah, everytime npm2nix fails, it generates only header, so there is some other error, besides the empty file. Too bad i have to fix it every few months(but it's the only thing we have and code is a bit of mess, and yeah coffescript), we will have to figure out simpler and more solid solution for new npm2nix, any ideas? |
Hmm, one problem I found was that The generated nix file is still not complete though, I'll investigate further. I see how you'd have to fix things every few months. This really is quite annoying. If npm had some kind of library that handles most of what you're doing in npm2nix, that might be better. Though, from what I've found they don't. |
Yeah, i think it should be save to downgrade semver if it fixes the On Sun, Jun 7, 2015 at 9:20 PM Bob van der Linden notifications@github.com
|
I've submitted #24, which solved the problem of a incomplete output for me. It should also give a better indication why the file isn't complete yet (if this is still a problem), because one of the packages is stuck fetching the necessairy data. With the PR it'll show which packages still seem to be fetching at that time. |
@offlinehacker |
It might be sane to add a feature to "npm ls" to output json, this solves a On Sun, Jun 7, 2015 at 11:35 PM Bob van der Linden notifications@github.com
|
"npm ls" outputs all packages in a recursive tree. You do see the dependencies that way. What is still missing is the hashes for the targz files. It would be nice if npm could download only the targz files, so that npm2nix can hash them. Not sure what a good approach would be for this though. Maybe those files are available in some cache? EDIT: Having it in JSON would be a nice approach I think. |
And hashes for git repos i guess too... On Sun, Jun 7, 2015 at 11:47 PM Bob van der Linden notifications@github.com
|
Oh right, I forgot about those. Since git repos as dependencies aren't the norm it doesn't matter much to retrieve them seperately. As for targz files: here is the cache: |
I'm really looking forward to #25, sounds like the right way to do things! In the mean time, is there a way to get the error from npm2nix so we know where to dig? |
Any news? Nodejs is rather unusable without npm2nix. The latest nixos unstable as of NixOS/nixpkgs@1357692 still has this issue. |
We have to make a new implementation, current one is broken by design and On Thu, Aug 20, 2015 at 9:31 PM lethalman notifications@github.com wrote:
|
@offlinehacker What about the shrinkwrap idea? Is that a viable solution or is it something to avoid? |
I'm running npm2nix on my package.json and it finishes without errors, but I'm getting a file that looks like this :
I have node v0.12.2 and npm2nix 5.8.1 installed.
The text was updated successfully, but these errors were encountered: