Open srghma opened 6 years ago
From https://github.com/adnelson/nixfromnpm/issues/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: my-create-react-app@0.0.1 -> image-webpack-loader@4.3.1 -> imagemin-svgo@6.0.0 -> svgo@1.0.5 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' + css-select@1.3.0-rc0 added 9 packages in 0.791s ~/projects/my-create-react-app nixfromnpm ✚ nixfromnpm -o /tmp/nix-test -p 'css-select@1.3.0-rc0' ~/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?
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
From https://github.com/adnelson/nixfromnpm/issues/144
When I do ... I have an error
But following readme https://github.com/adnelson/nixfromnpm#troubleshooting-a-package-that-doesnt-build I can build package
How to prevent this?