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

Created on 25 Apr 2017  路  9Comments  路  Source: hexojs/hexo

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

Most helpful comment

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. :)

All 9 comments

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. :)

thank u ,it work

@RupGautam 's method worked for me as well.

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

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,

@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.

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 https://github.com/hexojs/hexo/issues/2785#issuecomment-338391933

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.

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!

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
Was this page helpful?
0 / 5 - 0 ratings

Related issues

hjmJhon picture hjmJhon  路  3Comments

mashirozx picture mashirozx  路  3Comments

jakeg picture jakeg  路  3Comments

lushijie picture lushijie  路  3Comments

yunTerry picture yunTerry  路  3Comments