Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Unable to install/update v4.4 on OSX #191

Open
heildever opened this issue Sep 19, 2018 · 4 comments
Open

Unable to install/update v4.4 on OSX #191

heildever opened this issue Sep 19, 2018 · 4 comments

Comments

@heildever
Copy link

Environment:

  • macOS 10.13.6

  • Atom 1.30.0

  • Node v8.12.0 & Npm 6.4.1

  • Xcode command line tools installed, No Xcode

  • Anaconda python2.7 env (node-gyp doesn't support pythonv3)

Steps to reproduce:

  • source activate <env_name>

  • apm update etheratom

└── etheratom 4.3.9 -> 4.4.0

Would you like to install these updates? (yes) y

Installing [email protected] to ~/.atom/packages ✗

> [email protected] preinstall /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/.staging/scrypt-01065e1f
> node node-scrypt-preinstall.js


> [email protected] install /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/etheratom/node_modules/nodent-runtime
> node build.js

## Built /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/etheratom/node_modules/nodent-runtime/dist/index.js

> [email protected] install /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/etheratom/node_modules/keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."


> [email protected] rebuild /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/etheratom/node_modules/keccak
> node-gyp rebuild

Keccak bindings compilation fail. Pure JS implementation will be used.

> [email protected] install /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/etheratom/node_modules/scrypt
> node-gyp rebuild

/private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr
└── (empty)


npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Traceback (most recent call last):
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write
    self.Pchify))
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources
    cflags = self.xcode_settings.GetCflags(configname)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags
    archs = self.GetActiveArchs(self.configname)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
    xcode_archs_default = GetXcodeArchsDefault()
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.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 (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/etheratom/node_modules/keccak
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 

npm ERR! Darwin 17.7.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/npm" "run" "rebuild"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] rebuild script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the keccak package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs keccak
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls keccak
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/etheratom/node_modules/keccak/npm-debug.log
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Traceback (most recent call last):
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 817, in Write
    mac_bundle_deps, extra_outputs, part_of_all)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1453, in WriteTarget
    lambda p: Sourceify(self.Absolutify(p)))
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 809, in GetLdflags
    archs = self.GetActiveArchs(self.configname)
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
    xcode_archs_default = GetXcodeArchsDefault()
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()
  File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.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 (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/node_modules/etheratom/node_modules/scrypt
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/package.json'
npm WARN [email protected] requires a peer of eslint@>=3.1.0 but none was installed.
npm WARN apm-install-dir-118819-17015-13no88n.yuw8psnhfr No description
npm WARN apm-install-dir-118819-17015-13no88n.yuw8psnhfr No repository field.
npm WARN apm-install-dir-118819-17015-13no88n.yuw8psnhfr No README data
npm WARN apm-install-dir-118819-17015-13no88n.yuw8psnhfr No license field.
npm ERR! Darwin 17.7.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/s225055/.atom/.apm/.apmrc" "--userconfig" "/Users/s225055/.atom/.apmrc" "install" "/private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/d-118819-17015-z1l1hb.zoypgv6lxr/package.tgz" "--runtime=electron" "--target=2.0.5" "--arch=x64" "--global-style"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the scrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs scrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls scrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/var/folders/wt/0bpk13l138l99xp67_18t6500000gn/T/apm-install-dir-118819-17015-13no88n.yuw8psnhfr/npm-debug.log
npm ERR! code 1

Take a look at https://github.com/nodejs/node-gyp/issues/569 for a potential solution, which didn't work for me.

@0x-genesys
Copy link

python2.7 is needed

(node-gyp doesn't support pythonv3):

try:

node-gyp --python=python2.7

@tobyjaguar
Copy link

I am having the same issue on OSX with Atom 1.31.1. I didn't have node-gyp installed, installed that, attempted the command above, which didn't fix the failure.

@heildever
Copy link
Author

@0mkara have actually found out that the only way around is to install Xcode. You might want to join Telegram channel, please see for solution nodejs/node-gyp#569 (comment)

@larryob
Copy link

larryob commented Oct 25, 2018

@heildever @0mkara
You actually don't need to install Xcode, the problem here is the node-gyp version that is bundled with Atom.

Atom 1.32.0 comes with node 8.9.3, npm 6.2.0, and node-gyp 3.4.0.
node-gyp 3.4.0 doesn't have this pull request merged, so it prints a message about xcodebuild needing Xcode.

As for the AttributeError above that causes node-gyp rebuild to fail, that was fixed here. So you just need to update apm's node-gyp version for the install to work.

cd /Applications/Atom.app/Contents/Resources/app/apm
npm install [email protected]  # latest version
apm install etheratom

Here's a comment that does a similar upgrade in the issue @heildever linked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants