Reputation: 123
I'm currently learning how to work with React and everytime I try to work on a course file and run npm install
I get back a million errors and warning. On literally every file I try this on. I've made sure I'm inside the right directory and that there is a json file.
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jessiematias/Downloads/hooks-videoplayer-starterfiles-master/react-hooks-videoplayer-START/node_modules/webpack-dev-server/node_modules/fsevents
gyp ERR! node -v v12.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
I've already tried to reinstall node, update npm to latest version (i'm on 6.14.4) and run npm cache clean but none of those worked. The only thing that worked once was to run a command that was something along the lines of npm install missing dependencies
but that's not it, i can't remember it or find it anywhere online now.
Upvotes: 0
Views: 1863
Reputation: 16089
You are having a problem with the C compiler of node. Often, this module (node-gyp
) is a dependency of one of your dependencies. The problem usually occurs, if not all settings are correctly set. Follow the official installation guide of node-gyp
:
Upvotes: 1