-
[solution] npm install node gyp ERR! stack Error: `make` failed with exit code: 2Infra/linux 2020. 2. 5. 12:37
Amazon linux 2 에서
npm install 시
아래와 같은 에러가 발생한다면
gyp ERR! stack Error: `make` failed with exit code: 2
(스크린샷)
(에러 로그)
gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) 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 Linux 4.14.154-128.181.amzn2.x86_64 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/ec2-user/app/node_modules/sleep gyp ERR! node -v v12.14.1 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm WARN bootstrap@4.4.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself. npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sleep@6.1.0 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sleep@6.1.0 install 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! /home/ec2-user/.npm/_logs/2020-02-05T03_30_15_061Z-debug.log
아래 명령어로 빌드 툴을 설치하면 해결.
$ sudo yum install gcc-c++
'Infra > linux' 카테고리의 다른 글
nginx에 무료 ssl 자동 갱신 명령어 묶음 (feat. let's encrypt) (0) 2024.03.08 [linux] ssh - timeout 발생 방지 방법 (0) 2021.06.01 [linux] ubuntu(우분투)에 외장하드 마운트 연결 시키는 법 (0) 2021.01.15 [ssh] (Solution) WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! (0) 2019.12.13 [shell script] How to write password of sudo on one command line (0) 2019.11.14