Reputation: 71
Any npm package I try to install or even just npm install itself will it give me the following error.
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/node_expat/node-expat.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/myname/.npm-global/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/Users/myname/.npm-global/lib/node_modules/node/bin/node" "/Users/name/.npm-global/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/myname/Desktop/Portfolio/portfolio/node_modules/node-expat
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I've already tried removing my node-gyp file in my home directory, deleting my node_modules folder from my project and json lock file. I've also tried uninstalling npm and re-installing it as well as restarting my mac.
Upvotes: 2
Views: 16482
Reputation: 685
You can see pull request at here: https://github.com/astro/node-expat/pull/196. I think you are using Node 12. You can downgrade Node version to 10 or 8. Some warning can occur but you can install node-expat success. May be it useful for you.
Upvotes: 6