이 문제는 모든 프로젝트에서 발생하지 않습니다. 특히 npm i
(노드 v6.9.4 (npm v5.6.0) <)을 실행하면이 문제가 발생합니다. 확인이) 맞다면 :노드 - gyp 재 작성 문제 컴파일러
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__threading_support:25:11: fatal error:
'pthread.h' file not found
# include <pthread.h>
오류 로그 :
12788 verbose stack Error: [email protected] install: `node-gyp rebuild`
12788 verbose stack Exit status 1
12788 verbose stack at EventEmitter.<anonymous> (/Users/tom.firth/.nvm/versions/node/v6.9.4/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
12788 verbose stack at emitTwo (events.js:106:13)
12788 verbose stack at EventEmitter.emit (events.js:191:7)
12788 verbose stack at ChildProcess.<anonymous> (/Users/tom.firth/.nvm/versions/node/v6.9.4/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
12788 verbose stack at emitTwo (events.js:106:13)
12788 verbose stack at ChildProcess.emit (events.js:191:7)
12788 verbose stack at maybeClose (internal/child_process.js:877:16)
12788 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
12789 verbose pkgid [email protected]
12790 verbose cwd /Users/tom.firth/Sites/the-works
12791 verbose Darwin 16.7.0
12792 verbose argv "/Users/tom.firth/.nvm/versions/node/v6.9.4/bin/node" "/Users/tom.firth/.nvm/versions/node/v6.9.4/bin/npm" "i"
12793 verbose node v6.9.4
12794 verbose npm v5.6.0
12795 error code ELIFECYCLE
12796 error errno 1
12797 error [email protected] install: `node-gyp rebuild`
12797 error Exit status 1
12798 error Failed at the [email protected] install script.
12798 error This is probably not a problem with npm. There is likely additional logging output above.
12799 verbose exit [ 1, true ]
이 두 점의 node-gyp rebuild
에 -이 전에 전 세계적으로 설치가 없었어요,하지만 난 그것을 시도하고 없이 동일한 오류가 발생합니다.
은 엑스 코드 9.1을 설치하고 실행 내가 한 :주는 $ xcode-select --install
: 제공 npmjs.com/fixing-npm-permissions
$ gcc --version
:주는
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ which gcc
내가의 단계를 따라 xcode-select: error: command line tools are already installed, use "Software Update" to install updates
: /usr/bin/gcc
node-gyp
문제는 날이 컴파일러에 관련이하지만 난 (BREW 및 nodejs.org를 통해) 엑스 코드와 노드
어떤 도움이나 제안 정말 감사하겠습니다을 다시 설치 한 생각합니다.
편집 : 5.6.0 분명 잘되지 않았기 때문에
나는 NPM 3.10.10을 시도했습니다. 이전에 설치되었지만 문제가 해결되지 않았습니다.
xcode 9.1을 대체하기 위해 xcode 8.2.1을 설치했지만 문제가 해결되지 않았습니다.
libtool이 이미 설치되었습니다. 파이썬의 기본값은 2.7.10으로 설정됩니다. 노드 js 워크샵을 확인해 드리겠습니다. 감사합니다. – TomFirth