锦方的个人网页 · 如果有一天你突然想起了我


把hexo移到了mac上

目录

安装

下载node

https://nodejs.org/en/

下载 homebrew

http://brew.sh/index_zh-cn.html

下载HEXO https://hexo.io/zh-cn/docs/

错误

遇到一个因为没有翻墙而发生的错误

../src/sass_context_wrapper.h:8:10: fatal error: 'sass/context.h' file not found
#include <sass/context.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/jin/Dropbox/blog/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/usr/local/bin/node" "/Users/jin/Dropbox/blog/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/jin/Dropbox/blog/node_modules/node-sass
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jin/.npm/_logs/2017-11-15T15_43_47_806Z-debug.log
···
解决方法
https://github.com/lmk123/blog/issues/28

还出现一个错误

{ Error: Cannot find module './build/Release/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. (/xxxx/xx/xx/xx/xx/xx/xx/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) code: 'MODULE_NOT_FOUND' }

解决方法

npm install dtrace-provider --save