Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve version checker: Failed to generate expressions for 1 downstream dependencies css-select@>=1.3.0-rc0 <1.4.0 #9

Open
srghma opened this issue Jul 3, 2018 · 1 comment

Comments

@srghma
Copy link

srghma commented Jul 3, 2018

From adnelson/nixfromnpm#144

When I do ... I have an error

nixfromnpm -f package.json -o nix --dev-depth 1
....
Writing package file at /home/srghma/projects/my-create-react-app/nix/nodePackages/my-create-react-app/0.0.1.nix
Generating package definition object in /home/srghma/projects/my-create-react-app/nix/nodePackages/default.nix
Failed to generate expressions for 1 downstream dependencies.
  css-select@>=1.3.0-rc0 <1.4.0
   Dependency of:
    [email protected] -> [email protected] -> [email protected] -> [email protected]
Failed to build because: NoMatchingVersion >=1.3.0-rc0 <1.4.0
No packages to build.

But following readme https://github.com/adnelson/nixfromnpm#troubleshooting-a-package-that-doesnt-build I can build package

 ✘  ~/projects/my-create-react-app   nixfromnpm ✚  npm install -g 'css-select@>=1.3.0-rc0 <1.4.0'
+ [email protected]
added 9 packages in 0.791s


 ~/projects/my-create-react-app   nixfromnpm ✚  nixfromnpm -o /tmp/nix-test -p '[email protected]'

 ~/projects/my-create-react-app   nixfromnpm ✚  ls -al /tmp/nix-test
total 4
drwxr-xr-x  4 srghma users 100 Jul  3 22:09 .
drwxrwxrwt 26 root   root  820 Jul  3 22:09 ..
-rw-r--r--  1 srghma users 269 Jul  3 22:09 default.nix
drwxr-xr-x  3 srghma users 160 Jul  3 22:09 nodeLib
drwxr-xr-x 10 srghma users 220 Jul  3 22:09 nodePackages

 ~/projects/my-create-react-app   nixfromnpm ✚  cat /tmp/nix-test/nodePackages/css-select/1.3.0-rc0.nix
{ buildNodePackage, nodePackages, pkgs }:
buildNodePackage {
    name = "css-select";
    version = "1.3.0-rc0";
    src = pkgs.fetchurl {
      url = "https://registry.npmjs.org/css-select/-/css-select-1.3.0-rc0.tgz";
      sha1 = "6f93196aaae737666ea1036a8cb14a8fcb7a9231";
    };
    deps = with nodePackages; [
      css-what_2-1-0
      nth-check_1-0-1
      domutils_1-5-1
      boolbase_1-0-0
    ];
    meta = {
      homepage = "https://github.com/fb55/css-select#readme";
      description = "a CSS selector compiler/engine";
      keywords = [
        "css"
        "selector"
        "sizzle"
      ];
    };
  }

How to prevent this?

@srghma
Copy link
Author

srghma commented Jul 3, 2018

How to reproduce the issue

git clone https://github.com/srghma/my-create-react-app
cd my-create-react-app
git checkout nixfromnpm
nixfromnpm -f package.json -o nix --dev-depth 1 --no-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant