Soenneker.Node.Util 4.0.329

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Node.Util --version 4.0.329
                    
NuGet\Install-Package Soenneker.Node.Util -Version 4.0.329
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Node.Util" Version="4.0.329" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Node.Util" Version="4.0.329" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Node.Util" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Node.Util --version 4.0.329
                    
#r "nuget: Soenneker.Node.Util, 4.0.329"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Node.Util@4.0.329
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Node.Util&version=4.0.329
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Node.Util&version=4.0.329
                    
Install as a Cake Tool

Soenneker.Node.Util

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Locates Node.js tooling, optionally installs Node.js or pnpm, and runs repeatable npm dependency installs from .NET.

Installation

dotnet add package Soenneker.Node.Util

Registration

using Soenneker.Node.Util.Registrars;

builder.Services.AddNodeUtilAsSingleton();
// or: builder.Services.AddNodeUtilAsScoped();

Locate Node.js without modifying the machine

using Soenneker.Node.Util.Abstract;

string nodePath = await node.EnsureInstalled(
    minVersion: "20.11.1",
    installIfMissing: false,
    cancellationToken);

TryLocate(minVersion) returns null when no installation meets the minimum. TryLocateAny() accepts any version. Discovery checks the hosted-tool cache on Windows and then probes common node command names. Probe failures return null, while caller cancellation is propagated.

GetNodePath(command) executes the supplied Node executable and returns process.execPath. GetNpmPath and GetNpxPath search PATH and common platform locations, but may return the bare command name when no file is resolved. GetGlobalToolPath accepts a single tool file name and confines lookup to npm's global binary directory.

Install project dependencies

string output = await node.NpmInstall(
    directory: repositoryPath,
    cleanInstall: true,
    omitDevDependencies: false,
    ignoreScripts: true,
    noAudit: true,
    noFund: true,
    skipIfUpToDate: true,
    cancellationToken);

cleanInstall: true runs npm ci and therefore requires package-lock.json or npm-shrinkwrap.json. Otherwise the utility runs npm install.

After a successful install, the utility writes npm-install.lockhash in the project directory. A later call skips npm only when node_modules exists and the marker matches:

  • package.json;
  • the shrinkwrap or lock file, when present;
  • the resolved Node.js and npm versions;
  • cleanInstall, omitDevDependencies, and ignoreScripts.

Install calls for the same resolved directory are serialized within the process. A missing, stale, or unreadable marker runs npm again. Add the marker to .gitignore if it is only a local build artifact.

ignoreScripts defaults to false, which allows dependency lifecycle scripts to execute with the current account's permissions. Use true for untrusted dependency trees unless the build explicitly requires those scripts. noAudit: true suppresses npm's audit request; it is not a security scan.

Machine-wide installation

EnsureInstalled defaults to installIfMissing: true. Depending on the OS, installation invokes sudo apt-get, winget or Chocolatey, or Homebrew. Linux package installation uses the configured apt repository and does not select the requested Node major. Windows and macOS installers select a major where their package manager supports it. EnsureInstalled always probes again and fails if the installed result does not satisfy the requested minimum.

InstallPnpm runs a global npm install -g pnpm. RunNpmCommand executes the provided raw npm arguments. Treat both as privileged operations and pass only application-controlled arguments. Package-manager changes are not rolled back when cancellation or a later step fails.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.332 0 9/25/2026
4.0.331 0 9/25/2026
4.0.330 32 9/24/2026
4.0.329 34 9/24/2026
4.0.328 67 9/24/2026
4.0.327 184 9/17/2026
4.0.326 96 9/17/2026
4.0.325 96 9/16/2026
4.0.324 96 9/16/2026
4.0.322 139 9/15/2026
4.0.321 149 9/13/2026
4.0.320 100 9/13/2026
4.0.319 105 9/13/2026
4.0.318 105 9/13/2026
4.0.317 127 9/13/2026
4.0.316 124 9/12/2026
4.0.315 103 9/12/2026
4.0.313 177 9/10/2026
4.0.312 126 9/9/2026
4.0.311 114 9/9/2026
Loading failed

Updated Multiple NuGet packages