NPM Unable to find balanced match module

Any command I try to run with npm I get:

module.js:340 throw err; ^ Error: Cannot find module 'balanced-match' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/glob/node_modules/minimatch/ node_modules/brace-expansion/index.js:2:16) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) 

Including when I try npm install -g balanced-match

+6
source share
2 answers

I know this is very old, and I hope you find your answer, but for future questers:

I recently saw this problem when I tried using npm after upgrading node to a newer version with

0
source

I can offer you the following link, which suggests installing

npm balanced match

https://www.npmjs.com/package/balanced-match

or download from

github.com/juliangruber/balanced-match

-1
source

All Articles