【发布时间】:2019-04-04 05:10:52
【问题描述】:
2019-04-04T04:34:49.035Z - error: Error when loading extension Error: The module '/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-pdf-password/node_modules/hummus/binding/hummus.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Error: The module '/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-pdf-password/node_modules/hummus/binding/hummus.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
我曾尝试使用 nvm 降级节点版本。我已经成功完成并减少到所需的版本(即)8.9.1。因此,当我检查命令“node -v”时,我得到 8.9.1。
但是当我检查“nodejs -v”时,我只得到 11.9.0。因此发生了上述错误。我也无法确定如何更改 nodejs 版本?有什么想法吗?
另外,我尝试在完全不同的文件夹中的 node 和 nodejs 中安装具有相同版本 11.9.0 的“jsreport-pdf-password”,并且还删除了 node_modules。仍然出现此错误。
【问题讨论】:
标签: node.js installation node-modules nvm