Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > PackageJsonLookup > tryLoadNodePackageJsonFor

PackageJsonLookup.tryLoadNodePackageJsonFor() method

This function is similar to PackageJsonLookup.tryLoadPackageJsonFor(), except that it does not report an error if the version field is missing from the package.json file.

Signature:

tryLoadNodePackageJsonFor(fileOrFolderPath: string): INodePackageJson | undefined;

Parameters

ParameterTypeDescription
fileOrFolderPathstring

Returns:

INodePackageJson | undefined