OS:
~ ❯❯❯ sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.5
原子
~ ❯❯❯ atom --version
1.4.1
APM:
~ ❯❯❯ apm --version
apm 1.5.0
npm 2.13.3
node 0.10.40
python 2.7.10
git 2.7.0
尝试安装term2
会引发以下错误:
~ ❯❯❯ apm install term2
Installing term2 to /Users/MYUSERNAME/.atom/packages ✗
> pty.js@0.2.13 install /private/var/folders/sz/17d7_n895xn6mr10m4psrj3w0004lf/T/apm-install-dir-11614-23812-smvsx/node_modules/term2/node_modules/pty.js
> node-gyp rebuild
Traceback (most recent call last):
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
sys.exit(gyp.script_main())
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 533, in script_main
return main(sys.argv[1:])
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 526, in main
return gyp_main(args)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 502, in gyp_main
params, options.check, options.circular_check)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 129, in Load
params['parallel'], params['root_targets'])
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2736, in Load
variables, includes, depth, check, True)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 386, in LoadTargetBuildFile
includes, True, check)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 258, in LoadOneBuildFile
aux_data, includes, check)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 295, in LoadBuildFileIncludesIntoDict
LoadOneBuildFile(include, data, aux_data, None, False, check),
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 238, in LoadOneBuildFile
None)
File "/Users/MYUSERNAME/.atom/.node-gyp/.node-gyp/0.34.5/common.gypi", line 1
{
^
SyntaxError: invalid syntax
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/npm/node_modules/node-gyp/lib/configure.js:357:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/sz/17d7_n895xn6mr10m4psrj3w0004lf/T/apm-install-dir-11614-23812-smvsx/node_modules/term2/node_modules/pty.js
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Darwin 14.5.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/MYUSERNAME/.atom/.apm/.apmrc" "--userconfig" "/Users/MYUSERNAME/.atom/.apmrc" "install" "/private/var/folders/sz/17d7_n895xn6mr10m4psrj3w0004lf/T/d-11614-23812-15cf09r/package.tgz" "--target=0.34.5" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! pty.js@0.2.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js@0.2.13 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pty.js 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 their info via:
npm ERR! npm owner ls pty.js
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/sz/17d7_n895xn6mr10m4psrj3w0004lf/T/apm-install-dir-11614-23812-smvsx/npm-debug.log