node.js - 安装 Atom term2 包时出错

标签 node.js npm atom-editor node-gyp

操作系统:

~ ❯❯❯ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.10.5

原子:

~ ❯❯❯ atom --version
1.4.1

下午:

~ ❯❯❯ 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

最佳答案

截至 8 个月前:

Atom Term2 不再维护。请改用 Atom Term3 包:

$ apm install term3

来源:herehere .

关于node.js - 安装 Atom term2 包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35208527/

相关文章:

highcharts - 在 Zeppelin 中导入某些可视化 Helium 包时出错

angular - 如何创建具有多个路由的 Angular2 库?

python - 如何从conda环境启动atom

python - Atom - Python - 自动完成

javascript - 如何根据用户输入使用 Node.js 发出 HTTP 请求?

node.js - 在 Node js : Zapier 中解析 XML

javascript - Node.JS:类方法作为回调

javascript - Promise 中的单元测试 pg 发射器得到

javascript - 交付未定义

macos - 原子编辑器 "permission denied"| OSX 10.9.4 小牛队