Pm2-web installation error

error after executing $npm install-g pm2-web

npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hoek@0.7.6: The major version is no longer supported. Please update to 4.x or newer
npm WARN checkPermissions Missing write access to /opt/node/lib/node_modules/pm2-web/node_modules/mdns2
npm ERR! path /opt/node/lib/node_modules/pm2-web/node_modules/mdns2
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access "/opt/node/lib/node_modules/pm2-web/node_modules/mdns2"
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-11T15_19_26_614Z-debug.log

execute $cnpm install-g pm2-web and the following error occurs

In file included from ../src/dns_sd.cpp:1:0:
../src/mdns.hpp:31:20: :dns_sd.h:
 -sharpinclude <dns_sd.h>
                    ^

make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o]  1
make: "/opt/node/lib/node_modules/pm2-web/node_modules/_mdns2@2.1.4@mdns2/build" 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/node/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.4.95-1.al7.x86_64
gyp ERR! command "/opt/node/bin/node" "/opt/node/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/node/lib/node_modules/pm2-web/node_modules/_mdns2@2.1.4@mdns2
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
[npminstall:runscript:error] mdns2@^2.1.0 has binding.gyp file, run "node-gyp rebuild" error: Error: Run "sh -c node-gyp rebuild" error, exit code 1
[mdns2@^2.1.0] optional install error: Error: Run "sh -c node-gyp rebuild" error, exit code 1
    at ChildProcess.proc.on.code (/opt/node/lib/node_modules/cnpm/node_modules/runscript/index.js:74:21)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
execute post install 1 scripts...

the system is Linux work 4.4.95-1.al7.x86_64-sharp1 SMP Fri Dec 8 15:37:38 CST 2017 x86 "64 GNU/Linux

ask for help what went wrong

Pm2
Apr.18,2022
Menu