npm Cheat Sheet/Get a package.json field

Read a field from package.json.

Section: package.json editing

Get a package.json field

bash
bash
npm pkg get scripts
Explanation

Read a field from package.json.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing package.json editing
Set a package.json field
Write a field to package.json.
OpenIn sheetbashsame section
Delete a package.json field
Remove a field from package.json.
OpenIn sheetbashsame section
Show package root
Print the nearest package root path.
OpenIn sheetbashsame section
Show node_modules root
Print the local node_modules directory.
OpenIn sheetbashsame section
Initialize package.json
Run the interactive package initializer.
OpenIn sheetbash2 tag match
Initialize package.json with defaults
Create package.json using defaults.
OpenIn sheetbash2 tag match