npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm errors blocked my workflow

Hi, I am working on an open source project Oppia, and these npm errors blocked my workflow.

More details see:

What could be the cause of these errors? Thank you!

Down at the bottom of there is a call to npm list:


If you call npm list in a package in which you have not yet done an npm install, the list command generates those errors. A simplistic work-around in the script might be to test for the presence of node_modules folder before attempting to generate the package list?

Example instructions to show error:

# new folder
$ npm init -y
$ npm install commander
$ npm list
8213@1.0.0 /Users/john/Documents/Sandpits/
└── commander@2.20.0
$ rm -rf node_modules
$ npm list
8213@1.0.0 /Users/john/Documents/Sandpits/
└── UNMET DEPENDENCY commander@2.20.0

npm ERR! missing: commander@2.20.0, required by 8213@1.0.0

Hi John,

Thank you for your quick response and it helped us solve the issue!