Node module Printer was compiled against a different Node.js version

Discussão em 'Angular' iniciado por Prasham Shah, Janeiro 10, 2025.

  1. Prasham Shah

    Prasham Shah Guest

    I am trying to Update my angular project which is from angular version 8 to 9. I have used electron in my angular project. Currently I am updating my angular version 4.0.0 to 7.1.7 and in that process I am encountered with this error. I am using node-printer module version 0.4.0

    node_modules\printer\lib\node_printer.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 72. This version of Node.js requires
    NODE_MODULE_VERSION 75. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).


    [​IMG]

    I have tried following solutions found on various sources

    1. Remove node_modules and re-install after clearing cache.
    2. Rebuild project with npm rebuild
    3. My current node version is 12.8.4 and I have tried re-installation of node_modules with node versions 12.22.x, 12.8.1, 14.21.3 but none of this worked
    4. When tried to do npm install --save-dev electron-rebuild got this error Unexpected end of JSON input while parsing near '...":"^4.0.0","tsd-check'

    Continue reading...

Compartilhe esta Página