Looks like no one’s replied in a while. To start the conversation again, simply ask a new 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 ation.py", 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!code ELIFECYCLE

npmERR!errno 1

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

npmERR! Exit status 1

npmERR!

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: https://github.com/nodejs/node-gyp/issues/1454

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

Posted on Oct 23, 2018 10:43 PM

Reply
Question marked as Best reply

Posted on Nov 15, 2018 1:35 PM

Take a look at https://github.com/nodejs/node-gyp/issues/1464. 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 https://github.com/nodejs/node-gyp/wiki/Updating-npm's-bundled-node-gyp

Similar questions

1 reply

There are no replies.

npm gyp error on Mojave

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.