Announcement: Get Ready for macOS Catalina

Experience dedicated apps for music, TV, and podcasts, plus smart new features like Sidecar. Learn how to get ready >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.


Question: npm gyp error on Mojave

Does anyone know how to resolve errors like this?

I am trying to run 'npm i -S web3'

And I keep getting this error:

File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emul", line 1265, in XcodeVersion

version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]

AttributeError: 'NoneType' object has no attribute 'groups'

gypERR!configure error

gypERR!stack Error: `gyp` failed with exit code: 1

gypERR!stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)

gypERR!stack at ChildProcess.emit (events.js:182:13)

gypERR!stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)

gypERR!System Darwin 18.0.0

gypERR!command "/usr/local/Cellar/node/10.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gypERR!cwd /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/scrypt

gypERR!node -v v10.0.0

gypERR!node-gyp -v v3.6.2

gypERR!not ok


npmERR!errno 1

npmERR! scrypt@6.0.3 install: `node-gyp rebuild`

npmERR! Exit status 1


npmERR! Failed at the scrypt@6.0.3 install script.

npmERR! This is probably not a problem with npm. There is likely additional logging output above.

npmERR! A complete log of this run can be found in:

npmERR! /Users/rsm/.npm/_logs/2018-10-24T05_39_01_620Z-debug.log

Others seem to be having the same or similar problems but I can't tell if there is a fix:

MacBook Pro TouchBar and Touch ID, macOS High Sierra (10.13.1), 15" 512GB 16GB RAM Radeon Pro 455

Posted on


Nov 15, 2018 1:35 PM in response to brsm1990 In response to brsm1990

Take a look at In your case, npm is using node-gyp v3.6.2. According the aforementioned link, this issue is resolved in 3.6.3 or higher. To change the version of node-gyp bundled with your installation of npm, take a look at's-bundled-node-gyp

Nov 15, 2018 1:35 PM

Reply Helpful (1)
User profile for user: brsm1990

Question: npm gyp error on Mojave