Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE_MODULE_VERSION 46. This version of Node.js requires NODE_MODULE_VERSION 51. Please try re-compiling or re-installing #2534

Closed
JackGuoFranklin opened this issue Apr 25, 2017 · 9 comments

Comments

@JackGuoFranklin
Copy link

Error: The module '/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 46. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using npm rebuild ornpm install).
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
{ Error: Cannot find module './build/default/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/lib/log.js:3:14)
at Module._compile (module.js:571:32) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/Debug/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/guojunbing23/gitresource/blong/node_modules/hexo/node_modules/hexo-log/lib/log.js:3:14)
at Module._compile (module.js:571:32) code: 'MODULE_NOT_FOUND' }
INFO Deploying: git

@RupGautam
Copy link

RupGautam commented Apr 25, 2017

I ran into same issue, after updating node 7.x.x.
Rebuilding npm rebuild didn't work either, so
After, some digging I was able to resolved it by following:

  1. cd `which hexo'/../..
  2. rm -rvf node_modules
  3. npm install

cd into your hexo-project

  1. rm -rvf node_modules
  2. npm install

Edit: *WARNING: It will remove all your modules, that's why you have to npm install. If you have limited BW or slow connection, don't blame me. :)

@JackGuoFranklin
Copy link
Author

thank u ,it work

@sangjeedondrub
Copy link

@RupGautam 's method worked for me as well.

@chamanklalwani
Copy link

@RupGautam your solution worked for me too. (y)

@MikeMMao
Copy link

Maybe your Global installation files hasn`t been update, please try to update your hexo-cli with command below:

sudo npm install -g hexo-cli

this solved my problem.
BTW, RupGautam`s way delete too much modules on my mac, I had to stop try that,

@RupGautam
Copy link

RupGautam commented Feb 24, 2018

@MikeMMao LOL, I know it completely empties your modules.
I should have put "Warning" but it's too late now.
Answer updated now.
Thanks Mike.

@JLHwung
Copy link
Collaborator

JLHwung commented Feb 24, 2018

Maybe your Global installation files hasn`t been update, please try to update your hexo-cli with command below:

sudo npm install -g hexo-cli

never run sudo npm install -g hexo-cli, see #2785 (comment)

NODE_MODULE_VERSION 46. This version of Node.js requires NODE_MODULE_VERSION 51. Please try re-compiling or re-installing

It should be sufficient to run npm rebuild. But on your case, I recommend to run

  1. npm update hexo
  2. npm update -g hexo-cli

since we have get rid of dtrace-provider on recent hexo-log releases.

@lenvaz
Copy link

lenvaz commented Feb 5, 2019

I ran into same issue, after updating node 7.x.x.
Rebuilding npm rebuild didn't work either, so
After, some digging I was able to resolved it by following:

  1. cd `which hexo'/../..
  2. rm -rvf node_modules
  3. npm install

cd into your hexo-project

  1. rm -rvf node_modules
  2. npm install

Edit: *WARNING: It will remove all your modules, that's why you have to npm install. If you have limited BW or slow connection, don't blame me. :)

Thanks alot it worked for me!

@Lsnsh
Copy link

Lsnsh commented May 19, 2020

The above method does not work for me. I directly found the module directory of hexo and hexo-cli and deleted it, then reinstalled hexo-cli, this is feasible for me.

cd `which hexo`/../../..

rm -rf ./hexo ./hexo-cli

npm i -g hexo-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants