Open iq9891 opened 5 years ago
环境
问题: 执行 yarn 安装依赖的时候抛出如下错误
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 (/Users/lee/eventmosh/codelab/c-event/node_modules/node-gyp/lib/configure.js:345:16) gyp ERR! stack at ChildProcess.emit (events.js:180:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12) gyp ERR! System Darwin 18.2.0 gyp ERR! command "/Users/lee/.nvm/versions/node/v9.11.1/bin/node" "/Users/lee/eventmosh/codelab/c-event/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /Users/lee/eventmosh/codelab/c-event/node_modules/node-sass gyp ERR! node -v v9.11.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.10.0 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.10.0 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/lee/.npm/_logs/2019-02-20T05_43_54_754Z-debug.log
- 解决方案 - mac 上检查是否安装 XCode 软件 - 检查 命令行中是否安装 XCode 命令行插件,如果没有运行 `xcode-select --install`
good~
环境
问题: 执行 yarn 安装依赖的时候抛出如下错误
npm ERR! A complete log of this run can be found in: npm ERR! /Users/lee/.npm/_logs/2019-02-20T05_43_54_754Z-debug.log