-
Notifications
You must be signed in to change notification settings - Fork 23
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
create-next-app: Failed to fetch Inter
from Google Fonts.
#24
Comments
Any ideas? |
One of your dependencies (it looks like @next/font) tries to download the font as part of the build process. The nix build sandbox blocks network access however, so this fails. You need to somehow convince it to use an already downloaded copy of the font (you can get that from nixpkgs as |
adding here's the flake.nix {
description = "Test Flake";
inputs = {
nixpkgs.url = "nixpkgs";
systems.url = "github:nix-systems/x86_64-linux";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
pnpm2nix = {
url = "github:nzbr/pnpm2nix-nzbr";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pname = "test-flake";
version = "0.1.0";
buildInputs = with pkgs; [
nodejs_20
nodePackages_latest.pnpm
];
in
{
devShells.default = pkgs.mkShell {
inherit buildInputs;
shellHook = ''
#!/usr/bin/env bash
'';
};
packages.default = inputs.pnpm2nix.packages.${system}.mkPnpmPackage {
__noChroot = true; # disable nix sandbox to get internet access
inherit pname version;
src = ./.;
# uncomment to test ping or pnpm build
buildPhase = ''
# ${pkgs.pkgs.unixtools.ping}/bin/ping 8.8.8.8
# pnpm run build
'';
};
});
} in order to use |
Error log:
|
next build
builds fine but not withnix build
flake.nix
front.nix
The text was updated successfully, but these errors were encountered: