Giter Club home page Giter Club logo

Comments (6)

tgunnoe avatar tgunnoe commented on July 24, 2024

I'll just add a similar issue in the same place. If I add prom-client manually:
yarn add prom-client
the error will change to:
error: attribute '13.1.0' missing
(the injection package exists and is found, but the version doesn't match the version added). I suppose this may not be an issue, because the specified injection for express-prom-bundle."6.4.1" should be added separately, if another prom-client already exists.

from dream2nix.

tgunnoe avatar tgunnoe commented on July 24, 2024

As per @DavHau's suggestion that it may be error handling related and that I should add a source override, I tried this:

  {
    inputs.dream2nix.url = "github:nix-community/dream2nix";
    outputs = { self, dream2nix }@inputs:
      let
        dream2nix = inputs.dream2nix.lib2.init {
          systems = [ "x86_64-linux" ];
          config.projectRoot = ./. ;
        };
      in dream2nix.makeFlakeOutputs {
        source = ./.;
        inject = {
          express-prom-bundle."6.4.1" = [
            ["prom-client" "13.1.0"]
          ];
        };
        sourceOverrides = oldSources: {
          "prom-client"."13.1.0" = builtins.fetchurl {
            url = "https://github.com/siimon/prom-client/archive/v13.1.0.tar.gz";
            sha256 = "0nvxj4sz2hvqqlksp9fkxhx32qdwhf3g8ibglyfa38ljlk2mqdfk";
          };
        };
      };
  }

Still the same error as above error: attribute 'prom-client' missing.

from dream2nix.

DavHau avatar DavHau commented on July 24, 2024

Hey I was not able to reproduce the the error with the given flake. The flake does not specify the source project. Could you please provide a flake that manages the source via flake input or share the whole repo?

from dream2nix.

tgunnoe avatar tgunnoe commented on July 24, 2024

@DavHau

    {
      inputs.dream2nix.url = "github:nix-community/dream2nix";
      inputs.src.url = "github:tgunnoe/dream2nix-inject-test";
      inputs.src.flake = false;
      outputs = { self, dream2nix, src }@inputs:
        let
          dream2nix = inputs.dream2nix.lib.init {
            systems = [ "x86_64-linux" ];
            config.projectRoot = ./. ;
          };
        in dream2nix.makeFlakeOutputs {
          source = src;
          inject = {
            express-prom-bundle."6.4.1" = [
              ["prom-client" "13.1.0"]
            ];
          };
        };
    }

from dream2nix.

DavHau avatar DavHau commented on July 24, 2024

Thanks a lot for providing the flake. Now it's fixed

from dream2nix.

tgunnoe avatar tgunnoe commented on July 24, 2024

thanks!

from dream2nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.