Error: Cannot find module

Just a quick troubleshooting post for anyone using Hexo at the moment. If you go into your Hexo directory and do any Hexo command but recieve something similar to this:

1
2
3
[Error: Module did not self-register.]
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }

Don’t worry - it’s a really quick fix. Courtesy of Tommy351

Simply type:

1
npm install hexo --no-optional

That will get your Hex instakl back up & running no probs.

If you’re curious and want to know more checkout this issue on Github

What I’m Currently Listening To