0

When I use a function that uses pdfnet-node package I get this error message (it's an electron app if it is a necessary info):

Error: The module '\\?\G:\project_folder\node_modules\@pdftron\pdfnet-node\lib\addon.node'
was compiled against a different Node.js version using 
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 87. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Ryan
  • 2,473
  • 1
  • 11
  • 14
user15501498
  • 21
  • 2
  • 5
  • Try deleting node_modules and package-lock.json and reinstall using `npm install` – Akash Dathan Aug 15 '21 at 15:29
  • Yea, I did this several times and it didn't work – user15501498 Aug 15 '21 at 15:31
  • https://stackoverflow.com/questions/46384591/node-was-compiled-against-a-different-node-js-version-using-node-module-versio – Akash Dathan Aug 15 '21 at 15:32
  • Did you read this? **To install for Electron, runtime and target options are needed. For example, For Electron 6, we need to run npm i @pdftron/pdfnet-node --runtime=electron --target=6.0.0. Note that we need to use 6.0.0 for all Electron 6 versions.** https://www.npmjs.com/package/@pdftron/pdfnet-node – Ammar Aug 15 '21 at 15:48
  • Thanks, I just did it and that error is gone, now I have an exception that says it's unable to find a printer – user15501498 Aug 15 '21 at 15:53
  • So the original issue is resolved for you? As for the "unable to find a printer" did you ask this somewhere else? If not, then you should start a new question so you can get further assistance. – Ryan Aug 22 '21 at 18:12

0 Answers0