npm error on Mojave

Does anyone know how to resolve this?


And I keep getting this error:

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

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

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

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:336:16)

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

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

gyp ERR! System Darwin 18.0.0

gyp ERR! 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"

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

gyp ERR! node -v v10.0.0

gyp ERR! node-gyp -v v3.6.2

gyp ERR! not ok

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the scrypt@6.0.3 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! /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: https://github.com/nodejs/node-gyp/issues/1454

Are you speaking of Cocoapods ?


If so, you'd better contact cocoapods.org directly.


Note: please, when you post on forum, describe the context, eventually post code and not only dump a log report.

Works here with Node 8.12.0 + Xcode 10.0.


Looks like a regression bug in Node 10's xcode_emulation.py, as that regexp should read:


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

npm error on Mojave
 
 
Q