pm2-web 安装错误

发布于 2022-09-11 17:02:03 字数 2849 浏览 14 评论 0

执行 $ 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

执行 $ cnpm install -g pm2-web 则出现以下报错

In file included from ../src/dns_sd.cpp:1:0:
../src/mdns.hpp:31:20: 致命错误:dns_sd.h:没有那个文件或目录
 #include <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...

系统是 Linux work 4.4.95-1.al7.x86_64 #1 SMP Fri Dec 8 15:37:38 CST 2017 x86_64 x86_64 x86_64 GNU/Linux

求助一下是哪里出了问题

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文