Check that your package.json dependencies have the exact same version that another dependency also present in your package.json
Check that your package.json dependencies specifically satisfies the range passed in config
Check that your package.json dependencies specifically satisfies the range set in another dependencies
Check versions in a dependency Also useable to check if a dependency is not present
InternalgetInternalisInternalparsedInternalpkgOptionalauthor?: PersonOptionalbin?: string | Partial<Record<string, string>>The executable files that should be installed into the PATH.
Optionalbrowser?: string | Partial<Record<string, string | false>>A hint to JavaScript bundlers or component tools when packaging modules for client side use.
Optionalbugs?: BugsLocationThe URL to the package's issue tracker and/or the email address to which issues should be reported.
OptionalbundledDependencies?: string[]Package names that are bundled when the package is published.
OptionalbundleDependencies?: string[]Alias of bundledDependencies.
Optionalconfig?: JsonObjectIs used to set configuration parameters used in package scripts that persist across upgrades.
Optionalcontributors?: Person[]A list of people who contributed to the package.
Optionalcpu?: LiteralUnion<CPU architectures the module runs on.
Optionaldependencies?: Partial<Record<string, string>> & Record<string, string>The dependencies of the package.
Optionaldescription?: stringPackage description, listed in npm search.
OptionaldevDependencies?: Partial<Record<string, string>> & Record<string, string>Additional tooling dependencies that are not required for the package to work. Usually test, build, or documentation tooling.
Optionaldirectories?: DirectoryLocationsIndicates the structure of the package.
Optionalengines?: { [key: string]: string | undefined }Engines that this package runs on.
OptionalengineStrict?: booleanOptionalesnext?: A module ID with untranspiled code that is the primary entry point to the program.
Optionalexports?: ExportsSubpath exports to define entry points of the package.
Optionalfiles?: string[]The files included in the package.
Optionalflat?: booleanIf your package only allows one version of a given dependency, and you’d like to enforce the same behavior as yarn install --flat on the command-line, set this to true.
Note that if your package.json contains "flat": true and other packages depend on yours (e.g. you are building a library rather than an app), those other packages will also need "flat": true in their package.json or be installed with yarn install --flat on the command-line.
Optionalfunding?: Describes and notifies consumers of a package's monetary support information.
Optionalhomepage?: LiteralUnion<".", string>The URL to the package's homepage.
Optionalimports?: ImportsSubpath imports to define internal package import maps that only apply to import specifiers from within the package itself.
Optionaljspm?: PackageJsonJSPM configuration.
Optionalkeywords?: string[]Keywords associated with package, listed in npm search.
Optionallicense?: stringThe license for the package.
Optionallicenses?: { type?: string; url?: string }[]The licenses for the package.
Optionalmain?: stringThe module ID that is the primary entry point to the program.
Optionalmaintainers?: Person[]A list of people who maintain the package.
Optionalman?: string | string[]Filenames to put in place for the man program to find.
Optionalmodule?: stringAn ECMAScript module ID that is the primary entry point to the program.
The name of the package.
OptionaloptionalDependencies?: Partial<Record<string, string>> & Record<string, string>Dependencies that are skipped if they fail to install.
Optionalos?: LiteralUnion<Operating systems the module runs on.
OptionalpackageManager?: stringDefines which package manager is expected to be used when working on the current project. It can set to any of the supported package managers, and will ensure that your teams use the exact same package manager versions without having to install anything else than Node.js.
This field is currently experimental and needs to be opted-in; check the Corepack page for details about the procedure.
OptionalpeerDependencies?: Partial<Record<string, string>> & Record<string, string>Dependencies that will usually be required by the package user directly or via another dependency.
OptionalpeerDependenciesMeta?: Partial<Record<string, { optional: true }>>Indicate peer dependencies that are optional.
OptionalpreferGlobal?: booleanIf set to true, a warning will be shown if package is installed locally. Useful if the package is primarily a command-line application that should be installed globally.
Optionalprivate?: booleanIf set to true, then npm will refuse to publish it.
OptionalpublishConfig?: PublishConfigA set of config values that will be used at publish-time. It's especially handy to set the tag, registry or access, to ensure that a given package is not tagged with 'latest', published to the global public registry or that a scoped module is private by default.
Optionalrepository?: string | { directory?: string; type: string; url: string }Location for the code repository.
Optionalresolutions?: Partial<Record<string, string>> & Record<string, string>Selective version resolutions. Allows the definition of custom package versions inside dependencies without manual edits in the yarn.lock file.
OptionalresolutionsExplained?: Record<string, string>Optionalscripts?: ScriptsScript commands that are run at various times in the lifecycle of the package. The key is the lifecycle event, and the value is the command to run at that point.
OptionalsideEffects?: boolean | string[]Denote which files in your project are "pure" and therefore safe for Webpack to prune if unused.
Optionaltype?: "module" | "commonjs"Resolution algorithm for importing ".js" files from the package's scope.
Optionaltypes?: stringLocation of the bundled TypeScript declaration file.
OptionaltypesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>Version selection map of TypeScript.
Optionaltypings?: stringLocation of the bundled TypeScript declaration file. Alias of types.
Optionalversion?: stringPackage version, parseable by node-semver.
Optionalworkspaces?: string[] | WorkspaceConfigUsed to configure npm workspaces / Yarn workspaces.
Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run your install command once in order to install all of them in a single pass.
Please note that the top-level private property of package.json must be set to true in order to use workspaces.
InternalpkgInternalpkg
Example