jsreport / jsreport-pdf-password

jsreport extension adding password protection to PDF reports
https://jsreport.net
MIT License
7 stars 3 forks source link

Node version compile issue #5

Open visheshCuriousDev opened 5 years ago

visheshCuriousDev commented 5 years ago
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`).

This error occurs not during installation but during run time. From the error i can make out that it was compiled using node version 7 and when trying to run in node version above or below, this error occurs. I tried to even rebuild/install the package at a later version(11.9.0) but it did not solve the issue. The command i used is (sudo npm rebuild).

bjrmatos commented 5 years ago

can you try this npm rebuild hummus --build-from-source?

visheshCuriousDev commented 5 years ago

I ran the same command. The rebuild was successful. But during runtime i got the below error.

2019-04-08T06:42:19.787Z - 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 67. 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 67. 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:775:18)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-pdf-password/node_modules/hummus/hummus.js:5:31)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-pdf-password/lib/pdfPassword.js:7:14)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at /media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-core/lib/extensions/extensionsManager.js:122:16
    at tryCatcher (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-core/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-core/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-core/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromiseCtx (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-core/node_modules/bluebird/js/release/promise.js:606:10)
    at Async._drainQueue (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-core/node_modules/bluebird/js/release/async.js:138:12)
    at Async._drainQueues (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-core/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-core/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate (timers.js:637:19)
    at process.topLevelDomainCallback (domain.js:120:23)
bjrmatos commented 5 years ago

unfortunately i don't know what can be the problem, i mean, it is still complaining about compile target differences in your machine, the previous should have fixed it but it seems there is another issue for you. i never experienced this while working with the pdf-password extension so i think the best will be to submit an issue to the hummus package and ask how to solve that error.

visheshCuriousDev commented 5 years ago

I just posted an issue in hummus. I am using this module for a major report. Thus it i very critical to know if things can workout or not. Thanks for your support.

thehappycoder commented 4 years ago

Hummus isn't supported anymore:

Update 9/11/2019 Ending Support:
Hi All, after 6 years I decided to finish supporting HummusJS. You may still use the code as is, with the provided license, however I will not be providing answers, solutions, responses etc.
I'd like to thank everyone who used HummusJS and wish you all the best going forward with your projects.
Gal.
pofider commented 4 years ago

Thanks. We are aware, we've already prepared our native js solution which will be an integral part of the jsreport 2.8.0. We are shipping soon. Hopefully this week.

pofider commented 4 years ago

The 2.8.0 is now released - https://jsreport.net/blog/release-280