Upgrading from node 8 to node 10: error regarding “module compiled against a different Node.js version”










3















I am now getting the following error when I run my node app. It has only occurred after I upgraded from node 8.12.0 to node 10.13.0 (which is now "recommended for most users"). The problem seems to relate to node-expat, which I don't use directly but which is a dependency of xml2json (which I do use directly).



/root/workspace/myapp/node_modules/bindings/bindings.js:88
throw e
^

Error: The module '/root/workspace/myapp/node_modules/node-expat/build/Release/node_expat.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. 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`).
at Object.Module._extensions..node (module.js:682:18)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at bindings (/root/workspace/myapp/node_modules/bindings/bindings.js:81:44)
at Object.<anonymous> (/root/workspace/myapp/node_modules/node-expat/lib/node-expat.js:4:32)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)


What do I need to do to fix this? Yes, I have completely removed node_modules and done npm install as per this thread... doesn't help.










share|improve this question

















  • 1





    Try to also delete package-lock.json

    – Gabriel Bleu
    Nov 13 '18 at 16:35











  • @GabrielBleu there is no package-lock.json

    – drmrbrewer
    Nov 13 '18 at 16:59











  • Did you try npm cache clean -f (and reinstall everything)? There were multiple issues with npm registry in recent weeks. See the incident reports.

    – lependu
    Nov 13 '18 at 17:02












  • I wonder whether it has something to do with this commit made 3 months ago to node-expat: github.com/astro/node-expat/commit/…. The xml2json package is still referencing version 2.3.16 of node-expat in its package-lock.json (see github.com/buglabs/node-xml2json/blob/master/package-lock.json).

    – drmrbrewer
    Nov 13 '18 at 17:06












  • @lependu that doesn't help either. Re my comment just above... could it be that? How do I force a different version of node-expat on xml2json when xml2json isn't my own module... I'm just requireing that as a dependency in my node app (and package.json)?

    – drmrbrewer
    Nov 13 '18 at 17:10















3















I am now getting the following error when I run my node app. It has only occurred after I upgraded from node 8.12.0 to node 10.13.0 (which is now "recommended for most users"). The problem seems to relate to node-expat, which I don't use directly but which is a dependency of xml2json (which I do use directly).



/root/workspace/myapp/node_modules/bindings/bindings.js:88
throw e
^

Error: The module '/root/workspace/myapp/node_modules/node-expat/build/Release/node_expat.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. 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`).
at Object.Module._extensions..node (module.js:682:18)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at bindings (/root/workspace/myapp/node_modules/bindings/bindings.js:81:44)
at Object.<anonymous> (/root/workspace/myapp/node_modules/node-expat/lib/node-expat.js:4:32)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)


What do I need to do to fix this? Yes, I have completely removed node_modules and done npm install as per this thread... doesn't help.










share|improve this question

















  • 1





    Try to also delete package-lock.json

    – Gabriel Bleu
    Nov 13 '18 at 16:35











  • @GabrielBleu there is no package-lock.json

    – drmrbrewer
    Nov 13 '18 at 16:59











  • Did you try npm cache clean -f (and reinstall everything)? There were multiple issues with npm registry in recent weeks. See the incident reports.

    – lependu
    Nov 13 '18 at 17:02












  • I wonder whether it has something to do with this commit made 3 months ago to node-expat: github.com/astro/node-expat/commit/…. The xml2json package is still referencing version 2.3.16 of node-expat in its package-lock.json (see github.com/buglabs/node-xml2json/blob/master/package-lock.json).

    – drmrbrewer
    Nov 13 '18 at 17:06












  • @lependu that doesn't help either. Re my comment just above... could it be that? How do I force a different version of node-expat on xml2json when xml2json isn't my own module... I'm just requireing that as a dependency in my node app (and package.json)?

    – drmrbrewer
    Nov 13 '18 at 17:10













3












3








3








I am now getting the following error when I run my node app. It has only occurred after I upgraded from node 8.12.0 to node 10.13.0 (which is now "recommended for most users"). The problem seems to relate to node-expat, which I don't use directly but which is a dependency of xml2json (which I do use directly).



/root/workspace/myapp/node_modules/bindings/bindings.js:88
throw e
^

Error: The module '/root/workspace/myapp/node_modules/node-expat/build/Release/node_expat.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. 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`).
at Object.Module._extensions..node (module.js:682:18)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at bindings (/root/workspace/myapp/node_modules/bindings/bindings.js:81:44)
at Object.<anonymous> (/root/workspace/myapp/node_modules/node-expat/lib/node-expat.js:4:32)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)


What do I need to do to fix this? Yes, I have completely removed node_modules and done npm install as per this thread... doesn't help.










share|improve this question














I am now getting the following error when I run my node app. It has only occurred after I upgraded from node 8.12.0 to node 10.13.0 (which is now "recommended for most users"). The problem seems to relate to node-expat, which I don't use directly but which is a dependency of xml2json (which I do use directly).



/root/workspace/myapp/node_modules/bindings/bindings.js:88
throw e
^

Error: The module '/root/workspace/myapp/node_modules/node-expat/build/Release/node_expat.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. 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`).
at Object.Module._extensions..node (module.js:682:18)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at bindings (/root/workspace/myapp/node_modules/bindings/bindings.js:81:44)
at Object.<anonymous> (/root/workspace/myapp/node_modules/node-expat/lib/node-expat.js:4:32)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)


What do I need to do to fix this? Yes, I have completely removed node_modules and done npm install as per this thread... doesn't help.







node.js






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 16:31









drmrbrewerdrmrbrewer

2,18373190




2,18373190







  • 1





    Try to also delete package-lock.json

    – Gabriel Bleu
    Nov 13 '18 at 16:35











  • @GabrielBleu there is no package-lock.json

    – drmrbrewer
    Nov 13 '18 at 16:59











  • Did you try npm cache clean -f (and reinstall everything)? There were multiple issues with npm registry in recent weeks. See the incident reports.

    – lependu
    Nov 13 '18 at 17:02












  • I wonder whether it has something to do with this commit made 3 months ago to node-expat: github.com/astro/node-expat/commit/…. The xml2json package is still referencing version 2.3.16 of node-expat in its package-lock.json (see github.com/buglabs/node-xml2json/blob/master/package-lock.json).

    – drmrbrewer
    Nov 13 '18 at 17:06












  • @lependu that doesn't help either. Re my comment just above... could it be that? How do I force a different version of node-expat on xml2json when xml2json isn't my own module... I'm just requireing that as a dependency in my node app (and package.json)?

    – drmrbrewer
    Nov 13 '18 at 17:10












  • 1





    Try to also delete package-lock.json

    – Gabriel Bleu
    Nov 13 '18 at 16:35











  • @GabrielBleu there is no package-lock.json

    – drmrbrewer
    Nov 13 '18 at 16:59











  • Did you try npm cache clean -f (and reinstall everything)? There were multiple issues with npm registry in recent weeks. See the incident reports.

    – lependu
    Nov 13 '18 at 17:02












  • I wonder whether it has something to do with this commit made 3 months ago to node-expat: github.com/astro/node-expat/commit/…. The xml2json package is still referencing version 2.3.16 of node-expat in its package-lock.json (see github.com/buglabs/node-xml2json/blob/master/package-lock.json).

    – drmrbrewer
    Nov 13 '18 at 17:06












  • @lependu that doesn't help either. Re my comment just above... could it be that? How do I force a different version of node-expat on xml2json when xml2json isn't my own module... I'm just requireing that as a dependency in my node app (and package.json)?

    – drmrbrewer
    Nov 13 '18 at 17:10







1




1





Try to also delete package-lock.json

– Gabriel Bleu
Nov 13 '18 at 16:35





Try to also delete package-lock.json

– Gabriel Bleu
Nov 13 '18 at 16:35













@GabrielBleu there is no package-lock.json

– drmrbrewer
Nov 13 '18 at 16:59





@GabrielBleu there is no package-lock.json

– drmrbrewer
Nov 13 '18 at 16:59













Did you try npm cache clean -f (and reinstall everything)? There were multiple issues with npm registry in recent weeks. See the incident reports.

– lependu
Nov 13 '18 at 17:02






Did you try npm cache clean -f (and reinstall everything)? There were multiple issues with npm registry in recent weeks. See the incident reports.

– lependu
Nov 13 '18 at 17:02














I wonder whether it has something to do with this commit made 3 months ago to node-expat: github.com/astro/node-expat/commit/…. The xml2json package is still referencing version 2.3.16 of node-expat in its package-lock.json (see github.com/buglabs/node-xml2json/blob/master/package-lock.json).

– drmrbrewer
Nov 13 '18 at 17:06






I wonder whether it has something to do with this commit made 3 months ago to node-expat: github.com/astro/node-expat/commit/…. The xml2json package is still referencing version 2.3.16 of node-expat in its package-lock.json (see github.com/buglabs/node-xml2json/blob/master/package-lock.json).

– drmrbrewer
Nov 13 '18 at 17:06














@lependu that doesn't help either. Re my comment just above... could it be that? How do I force a different version of node-expat on xml2json when xml2json isn't my own module... I'm just requireing that as a dependency in my node app (and package.json)?

– drmrbrewer
Nov 13 '18 at 17:10





@lependu that doesn't help either. Re my comment just above... could it be that? How do I force a different version of node-expat on xml2json when xml2json isn't my own module... I'm just requireing that as a dependency in my node app (and package.json)?

– drmrbrewer
Nov 13 '18 at 17:10












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53285484%2fupgrading-from-node-8-to-node-10-error-regarding-module-compiled-against-a-dif%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53285484%2fupgrading-from-node-8-to-node-10-error-regarding-module-compiled-against-a-dif%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế