内部的Sitespeed.io显示不兼容的节点模块版本

时间:2018-12-19 04:26:41

标签: node.js npm node-modules sitespeed

我正在Centos上安装Sitespeed.io,但是虽然安装成功,但是却出现节点模块版本问题。

[root@XXXXXXXXX bin]# ./sitespeed.js https://www.google.com
sleep: using busy loop fallback
internal/modules/cjs/loader.js:718
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The module '/usr/lib/node_modules/sitespeed.io/node_modules/sharp/build/Release/sharp.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/usr/lib/node_modules/sitespeed.io/node_modules/sharp/lib/constructor.js:10:15)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/usr/lib/node_modules/sitespeed.io/node_modules/sharp/lib/index.js:3:15)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
[root@XXXXXXXX bin]# pwd
/usr/lib/node_modules/sitespeed.io/bin
[root@XXXXXXXX bin]#

我尝试了多种解决方法,例如 1.重新安装node和npm 2. $ rm -rf node_modules / bcrypt | $ npm安装 3. rm package-lock.json | rm -rf node_modules | npm我

还有其他解决方法吗? 我的安装步骤是:

npm install sitespeed.io -g --unsafe-perm

cd /usr/local/lib/node_modules/sitespeed.io/node_modules/alto-saxophone /

节点install.js

0 个答案:

没有答案