MacBook在安装好 hexo 和 node 之后,还是会出现如下的错误。
1 2 3 4 5 6 7 8 9 10
| 全局已经安装hexo,当前项目下也装了 blog git:(master) ✗ hexo { [Error: Cannot find module './build/Release/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' } { [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' } { [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' } { [Error: Cannot find module './build/Release/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' } { [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' } { [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' } ERROR Local hexo not found in ~/Documents/DATA/github/blog ERROR Try running: 'npm install hexo --save'
|
可以尝试如下的方式,我已经解决。
1 2 3 4 5
| $ npm install hexo --no-optional if it doesn try $ npm uninstall hexo-cli -g $ npm install hexo-cli -g
|