如何使用当前的Xcode/Mac OS X v10.8(Mountain Lion)或更高版本安装命令行构建工具?
与Xcode不同,没有安装程序(它只是一个包).
看起来所有命令行工具都在那里(在bundle中,在Contents/Developer下),但没有一个适当的环境变量设置为使用它们.
是否有一个我可以运行的脚本,它将设置我的环境以支持从命令行构建?
我正在尝试安装node-sass,但不允许我这样做。我尝试更新npm。
我把它放在:
须藤npm install -g node-sass
而我得到这个(从错误之前开始一行):
gyp verb build dir attempting to create "build" dir:
/Users/matt/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir
'/Users/matt/node_modules/node-sass/build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node"
"/Users/matt/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "-
-verbose" "--libsass_ext=" "--libsass_cflags=" "--
libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/matt/node_modules/node-sass
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN enoent ENOENT: no such file or …Run Code Online (Sandbox Code Playgroud)