Why does npm list -g lead to npm ERR! missing error?

npm returns the following message after using npm list -g

npm ERR! missing: atom-package-manager@*, required by undefined@undefined
npm ERR! missing: opal-npm-wrapper@git://github.com/anthonny/opal-npm-wrapper.git#0.1.1, required by asciidoctor.js@1.5.2
npm ERR! missing: xmlhttprequest@~1.6.0, required by asciidoctor.js@1.5.2

screenshot:

I know this an old question but I've been strugging with a similar issue and figure I'd at least add what worked for me...

Problem

Running npm list -g lists all packages as expected and then throws a variety of errors including the missing errors, as mentioned above, and, for me at least, a bunch of invalid and extraneous errors such as this:

extraneous: aws-sign2@0.5.0 /usr/local/lib/node_modules/npm/node_modules/aws-sign2

I tried a bunch of solutions including npm upgrade, npm prune, as well as installing missing packages, which for me was semver:

missing: semver@2 || 3, required by normalize-package-data@1.0.1

I'm still not sure of the exact cause for these errors, though I believe this happened when I upgraded to 3.3.6.

Solution

After some headache I ran:

npm update -g --verbose

which upgraded me from v3.3.6 to v3.5.3 and got rid of all the errors. Note that the --verbose is not necessary but helpful to see what exactly is happening. Now my npm list -g returns a clean output:

/usr/local/lib
├── npm@3.5.3
└── semver@2.3.2

Hope this helps someone, please comment if I've stated any inaccuracies or if there's something I can add here.

npm list errors on 5.6.0 with optional dependencies not installed , I'm opening this issue because: npm is returning an error What's going wrong? required by are-we-there-yet@1.1.4 npm ERR! missing: an earlier time that it was only bundled dependencies that cause the issue (#19428). npm list | select-string tsc npm ERR! extraneous: @types/core-js@0.9.34 C:\Users\XXX\src ode_modules\@types\core-js npm ERR! extraneous: canonical-path@0.0.2 C:\Users\XXX\src ode_modules\canonical-path npm ERR! extraneous: http-server@0.9.0 C:\Users\XXX\src ode_modules\http-server npm ERR! extraneous: karma-cli@1.0.1 C:\Users\XXX\src ode

For anyone having the same problem, try to run:

npm dedupe

for more info about npm dedupe please refer to the documentation. https://docs.npmjs.com/cli/dedupe.html

NPM List errors for missing dependencies of uninstall optional , C:\temp\nodetest>npm install npm WARN optional SKIPPING OPTIONAL The errors are all due to dependencies of the uninstalled optional� @jandet This seems to be an issue with the packaging of ember-cli@0.2.3 – when I used the package.json file you included up above, I was able to reproduce the exact same failure you saw.

Remove package-lock.json in /usr/local/lib.

6.8.0: `npm ci` fails with local dependency - bugs, What I Wanted to Do Run npm ci in a module with a local dependency on a parent directory. What Happened Instead npm ci failed with the following message: npm ERR! Contribute to jfirebaugh/npm-ci-bug development by creating an account on It looks like the problem of missing dependencies was introduced here:� npm ERR! addLocal Could not install C:\Users\Syed Mubarak\ionic npm ERR! Windows_NT 6.1.7600 npm ERR! argv "C:\Program Files odejs ode.exe" "C:\Program Files odejs node_modules\npm\bin\npm-cli.js" "install" "-g" "ionic" npm ERR! node v5.0.0 npm ERR! npm v3.3.6. npm ERR! 0-byte tarball npm ERR! Please run npm cache clean npm ERR! npm ERR!

You must have a global package named asciidoctor.js that is installed before its dependency packages are installed. I ran into the same problem today: some of my global package has "UNMET DEP" in its tree structure(run npm list -g to see the full depth of each global package), meaning its subdependencies are missing.

I solved by reinstalling each global package. If you had this problem on Arch Linux, first check this post: I have unmet dependencies

I had this problem surfaced after I sudo pacman -Syu and I have a bunch of ERROR missing semver and node-pyg.

As a side note, under Arch Linux node-pyg and semver are installed as dependencies before npm is installed through pacman(rather than through npm), and I guess the order these two are installed or updated matters. Probably under other OS or linux distros, these two packages are not listed in the repository.

http-errors, Create HTTP error objects. Search. Sign UpSign In. Miss any of our Open RFC calls?Watch the recordings here! � Install. npm i http-errors� You need to tell npm what to do when you run npm start explicitly by editing package.json. First, identify the main file of your application. Most often it is called index.js , server.js or app.js .

Manage npm packages, Visual Studio helps you to manage packages using the Node.js package manager (npm) For Node.js projects, the easiest way to install npm packages is through the to install a specific version that is not available in the versions list . Installed, but not explicitly listed in package.json; Missing package� @Berkmann18's workaround doesn't work for me; I still get the same npm ERR! missing messages with an npm ls command issued after the npm up, e.g.:. npm ERR! missing: mkdirp@0.5.1, required by node-pre-gyp@0.6.36 npm ERR! missing: rimraf@2.6.1, required by node-pre-gyp@0.6.36 npm ERR! missing: tar@2.2.1, required by node-pre-gyp@0.6.36 npm ERR! missing: minimist@0.0.8, required by mkdirp@0.5.1

Node.js Buildpack, For a list of supported Node versions, see the Node.js Buildpack supported, staging your app fails with the following error message: If missing dependencies are detected, the buildpack runs npm install for The nodejs- buildpack packages binaries of Node.js with OpenSSL that are statically linked. Why does npm list -g lead to npm ERR! missing error? 2. Ionic 2 Alert Component property create does not exist on type Alert. 1.

npm not installing dependencies recursively, npm run dev , So the error "Cannot find module '/home/vagrant/projectname/webpack.mix'" When I run npm list I find that so many dependencies are missing or unmet, I want to install those, but I don't want to do it manually cause there's so many of them. If you want to compile the file using npm start then, you should copy node-sass sass/main.scss css/style.css -w and paste it as a value for start. You can add any command you would like to execute as the value for start. Having said that, if you do npm "compile:sass" it will compile your sass files if you don't want to change your package.json.

Comments
  • what was the output of the npm install? Did it report any missing optional dependencies?
  • A downvote with no comment? Please elaborate... if this answer is incorrect or causes issues I'm happy to delete).
  • npm update -g --verbose didn't help. npm cache clean --force didn't help either. In my case, one of CLI apps was symlinked and it's from Lerna local folder so all deps were symlinked and deemed missing by npm. I reinstalled public version of it, same package but it's like phantom error which persists. Reported ERR dependencies are in place. It's not solved...
  • It'd be a huge help to readers if you explained why this is the right answer, and how you worked out that it was the problem.