Hi! I’m using Nix in my GitHub workflows at my company to build a product that involves (a) a NextJS app and (b) an internal NPM package, hosted at GitHub NPM packages (npm.pkg.github.com)
I’m trying to use buildNpmPackage to do the heavy lifting, but I can’t seem to successfully get my project’s .npmrc file (which specifies auth for the repo) to be respected.
Are there any examples of how to use buildNpmPackage with a private NPM repo? What’s the best practice here?
I struggled with the same issue. What ended up working was putting the following in my nixos configuration:
systemd.services.nix-daemon.serviceConfig.Environment = [
‘‘NIX_NPM_TOKENS={"registry.tiptap.dev":"MY-API-TOKEN"}’’
];
This allowed me to use a private npm registry when building my npm based project using buildNpmPackage.