macbook上使用npm 安装gitbook
$ npm install gitbook-cli -g
后,运行gitbook init 报错如下:
% gitbook init
Installing GitBook 3.2.3
(node:53712) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
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!
(node:53727) [DEP0150] DeprecationWarning: Setting pro

本文讲述了在MacBook上使用npm安装Gitbook时遇到的错误,涉及Xcode和CLT版本检测问题。通过设置和安装必要的组件,解决了`cb.apply is not a function`的TypeError。重点在于如何处理Xcode和命令行工具的配置。
最低0.47元/天 解锁文章
1884

被折叠的 条评论
为什么被折叠?



