question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gyp ERR! stack Error: `make` failed with exit code: 2 How to fix this?

See original GitHub issue
  • Node Version: node v16.16.0, npm v8.11.0

  • Platform: macOS 12.4 (21F79) M1

  • Compiler: Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

  • Module: node-gd

Verbose output (from npm or node-gyp):
$node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.1
gyp info using node@16.16.0 | darwin | arm64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: *** No targets specified and no makefile found.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/lib/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.5.0
gyp ERR! command "/opt/homebrew/Cellar/node@16/16.16.0/bin/node" "/opt/homebrew/bin/node-gyp" "build"
gyp ERR! cwd /Users/Maxorz
gyp ERR! node -v v16.16.0
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
MrMaxorzcommented, Aug 29, 2022
$ls -al /opt/homebrew/opt/node@16
lrwxr-xr-x  1 Maxorz  admin    25B Aug 29 16:40 /opt/homebrew/opt/node@16@ -> ../Cellar/node@16/16.17.0
0reactions
iMonZcommented, Sep 22, 2022

@cclauss any information here? I can’t find a solution in this thread, so could you please reopen this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

GYP ERR! build error. stack Error: 'make' failed with exit code 2
After attempting all the possible combinations of solutions (modify ~/.npmrc , remove ~/.node-gyp , clear the npm cache, delete node_modules and ...
Read more >
Debugging "Make Failed with Exit Code 2" Error - CodeForGeek
Debug #1: Deleting package-lock.json file ... Try to remove the package-lock.json file and remove node modules folder too. Then re-install the modules. ......
Read more >
gyp ERR! stack Error: make failed with exit code: 2 #1694
Follow these steps to resolve the issue. 1: Make sure you have build-tools installed. ... 3: Delete package-lock.json and node modules folder and ......
Read more >
Gyp ERR! stack Error: `make` failed with exit code: 2
Hi there,. I am running VS on a WSL (Windows Subsystem for Linux) and when I am trying to do 'npm install' I...
Read more >
Build is not working and I don't know why - Support
The error messages aren't any help either. 10:39:36 PM: npm ERR! | ^ ... 10:39:36 PM: npm ERR! gyp ERR! stack Error: make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found