Npm install error

when i run npm install , it return this error

npm ERR! err.code.match is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-07-12T10_03_33_090Z-debug.log

i dnot know what is casusing this problem.

Do not run npm as root, you’ll run into many issues.

Thank you , it’s worked