[Error NU1101] Unable to find package Telerik.UI.for.Blazor when running docker-compose up

1 Answer 81 Views
General Discussions
Top achievements
Rank 1
Ricardo asked on 17 Mar 2023, 10:35 AM

I'm running docker-compose up --force-recreate --build and obtaining the following error:

[+] Building 20.8s (17/17) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 32B                                                                                0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for mcr.microsoft.com/dotnet/sdk:7.0                                                  0.2s
 => [ 1/13] FROM mcr.microsoft.com/dotnet/sdk:7.0@sha256:e049e6a153619337ceb4edd040fb60a220d420414d41d6eb39708d6c  0.0s
 => [internal] load build context                                                                                  0.1s
 => => transferring context: 9.98MB                                                                                0.1s
 => CACHED [ 2/13] WORKDIR /app                                                                                    0.0s
 => CACHED [ 3/13] RUN apt install -y curl                                                                         0.0s
 => CACHED [ 4/13] RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -                                     0.0s
 => CACHED [ 5/13] RUN apt-get install -y nodejs                                                                   0.0s
 => CACHED [ 6/13] RUN curl -L https://www.npmjs.com/install.sh | sh                                               0.0s
 => CACHED [ 7/13] RUN apt install -y sshpass                                                                      0.0s
 => CACHED [ 8/13] WORKDIR /app                                                                                    0.0s
 => [ 9/13] COPY . .                                                                                               0.3s
 => [10/13] WORKDIR /app/wwwroot                                                                                   0.1s
 => [11/13] RUN npm install                                                                                        9.9s
 => [12/13] WORKDIR /app                                                                                           0.0s
 => ERROR [13/13] RUN dotnet publish -r ubuntu.18.04-x64 -c Release -o ./deploy/release                           10.1s
 > [13/13] RUN dotnet publish -r ubuntu.18.04-x64 -c Release -o ./deploy/release:
#0 0.574 MSBuild version 17.5.0+6f08c67f3 for .NET
#0 1.134   Determining projects to restore...
#0 1.137   Skipping project "/monitorix-server/monitorix-server.csproj" because it was not found.
#0 1.139   Skipping project "/monitorix-server/monitorix-server.csproj" because it was not found.
#0 9.653 /app/monitorix-ui.csproj : error NU1101: Unable to find package Telerik.UI.for.Blazor. No packages exist with this id in source(s): nuget.org
#0 9.722   Failed to restore /app/monitorix-ui.csproj (in 8.35 sec).
failed to solve: executor failed running [/bin/sh -c dotnet publish -r ubuntu.18.04-x64 -c Release -o ./deploy/release]: exit code: 1
I've included the necessary credentials in NuGet.config at %appdata%/roaming/nuget and the corresponding  package sources with the following feed url https://nuget.telerik.com/v3/index.json:
<?xml version="1.0" encoding="utf-8"?>
    <add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="Telerik" value="https://nuget.telerik.com/nuget" />
        <add key="Username" value="******@******.pt" />
        <add key="ClearTextPassword" value="**********" />
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
    <add key="skip" value="False" />
    <add key="format" value="0" />
    <add key="disabled" value="False" />
    <add key="pbanuget" value="true" />

The following is the .csproj file.

<Project Sdk="Microsoft.NET.Sdk.Web">


    <PackageReference Include="BlazorMonaco" Version="3.0.0" />
    <PackageReference Include="Telerik.UI.for.Blazor" Version="4.0.1" />


And finally my dockerfile:

FROM mcr.microsoft.com/dotnet/sdk:7.0
# Needed to install the web-ui dependencies
RUN apt install -y curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
RUN curl -L https://www.npmjs.com/install.sh | sh

# SSH tools
RUN apt install -y sshpass

# Copy app
COPY . . 

# Install web-ui dependencies
WORKDIR /app/wwwroot
RUN npm install

# dotnet core app restore/build and launch
RUN dotnet publish -r ubuntu.18.04-x64 -c Release -o ./deploy/release

ENTRYPOINT ["./app/deploy/monitorix-ui"]

What seems to be the problem here? Thank you

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 21 Mar 2023, 12:11 PM

Hello Ricardo,

This error...

>> No packages exist with this id in source(s): nuget.org

...means that your NuGet.Config file is not used - notice that the "Telerik" feed is not mentioned at all in the error message. The most common reason is that the file is not copied together with the project.

Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question