概述
hexo init时gyp出现错误
hexo init时gyp出现错误,原因是
Xcode
重命名后,xcodebuild
找不到原来的Xcode
。所以,我们重新设置Xcode
的路径。过程记录如下:
shaochenyang@shaochenyangs-MacBook-Pro ~/Document_Local/Blog hexo init
INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
正克隆到 '/Users/shaochenyang/Document_Local/Blog'...
remote: Enumerating objects: 30, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 161 (delta 12), reused 12 (delta 4), pack-reused 131
接收对象中: 100% (161/161), 31.79 KiB | 9.00 KiB/s, 完成.
处理 delta 中: 100% (74/74), 完成.
子模组 'themes/landscape'(https://github.com/hexojs/hexo-theme-landscape.git)已对路径 'themes/landscape' 注册
正克隆到 '/Users/shaochenyang/Document_Local/Blog/themes/landscape'...
remote: Enumerating objects: 1054, done.
remote: Total 1054 (delta 0), reused 0 (delta 0), pack-reused 1054
接收对象中: 100% (1054/1054), 3.21 MiB | 14.00 KiB/s, 完成.
处理 delta 中: 100% (581/581), 完成.
Submodule path 'themes/landscape': checked out '73a23c51f8487cfcd7c6deec96ccc7543960d350'
INFO Install dependencies
> fsevents@1.2.11 install /Users/shaochenyang/Document_Local/Blog/node_modules/nunjucks/node_modules/fsevents
> node-gyp rebuild
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/shaochenyang/Document_Local/Blog/node_modules/nunjucks/node_modules/fsevents
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
> ejs@2.7.4 postinstall /Users/shaochenyang/Document_Local/Blog/node_modules/ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/nunjucks/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
added 373 packages from 477 contributors and audited 2643 packages in 87.344s
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
INFO Start blogging with Hexo!
输入sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
并回车
最后
以上就是贤惠钻石为你收集整理的hexo init时gyp出现错误hexo init时gyp出现错误的全部内容,希望文章能够帮你解决hexo init时gyp出现错误hexo init时gyp出现错误所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复