javascript - 原子编辑器 : node-gyp rebuild crashes

标签 javascript python node.js node-gyp atom-editor

我正在尝试安装一个使用 node-gyp 的 atom 包。但它每次都会崩溃。

这是 apm 的输出:

Installing autocomplete-clang to /home/lars/.atom/packages ✗

> runas@1.0.1 install /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/clang-flags/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild


> runas@0.5.4 install /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/snippets/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild


npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/clang-flags
npm http 304 https://registry.npmjs.org/underscore-plus
npm http 304 https://registry.npmjs.org/clang-flags
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/loophole
npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/pegjs
npm http GET https://registry.npmjs.org/season
npm http GET https://registry.npmjs.org/temp
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/fs-plus
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/pegjs
npm http 304 https://registry.npmjs.org/season
npm http 304 https://registry.npmjs.org/pathwatcher
npm http 304 https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/event-kit
npm http 304 https://registry.npmjs.org/temp
npm http GET https://registry.npmjs.org/nan/1.2.0
npm http GET https://registry.npmjs.org/grim
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/emissary
npm http 304 https://registry.npmjs.org/emissary
npm http 304 https://registry.npmjs.org/nan/1.2.0
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/grim
npm http 304 https://registry.npmjs.org/event-kit
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/rimraf
gyp ERR! configure error 
gyp ERR! stack Error: EACCES, mkdir '/tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/clang-flags/node_modules/pathwatcher/node_modules/runas/build'
gyp ERR! System Linux 3.13.0-36-generic
gyp ERR! command "node" "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/clang-flags/node_modules/pathwatcher/node_modules/runas
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm http GET https://registry.npmjs.org/mixto
npm http GET https://registry.npmjs.org/property-accessors
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/loophole
npm ERR! runas@1.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the runas@1.0.1 install script.
npm ERR! This is most likely a problem with the runas 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 runas
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/bin/node" "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/.apmrc" "--userconfig" "/home/lars/.atom/.apmrc" "install" "/home/lars/.atom/.node-gyp/.atom/.apm/autocomplete-clang/0.2.0/package.tgz" "--target=0.11.10" "--arch=x64"
npm ERR! cwd /tmp/apm-install-dir-11499-22706-1lgjxbx
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm http 304 https://registry.npmjs.org/property-accessors
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan/0.8.0
npm http 304 https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/graceful-fs
npm http 200 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/nan/0.8.0
gyp ERR! configure error 
gyp ERR! stack Error: EACCES, mkdir '/tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/snippets/node_modules/pathwatcher/node_modules/runas/build'
gyp ERR! System Linux 3.13.0-36-generic
gyp ERR! command "node" "/usr/local/share/atom/resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/snippets/node_modules/pathwatcher/node_modules/runas
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/mixto
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /tmp/apm-install-dir-11499-22706-1lgjxbx/npm-debug.log
npm ERR! not ok code 0

网上有很多帖子描述了这个问题或类似的行为。显然 node-gyp 有点问题。

一开始我的python版本是2.7。这就是我所做的:

  1. 我删除了 atom 和 nodejs 并重新安装了它们的最新版本(来自源代码的 nodejs)。错误仍然存​​在
  2. 我用 npm 安装了 node-gyp 和 runas。错误仍然存​​在。
  3. 我删除了所有内容并从 chris-lea ppa 安装了它。错误仍然存​​在
  4. 我删除了所有内容,添加了 deadsnakes ppa,将我的 python 设置为旧的 2.6 版本,并检查了终端中的 python 命令运行的是哪个版本——它的 2.6。然后我从源代码重新安装了nodejs。使用 npm config 将 python 路径设置为 2.6。并重新安装了 node-gyp。错误仍然存​​在。
  5. 我删除了所有内容,除了旧的 python 设置。并从 chris-lea ppa 安装了 nodejs。同样的问题。
  6. 我删除了 ~/.atom/.node-gyp/并使用 npm 重新安装了它

在每一步之间,我都执行了一次 npm 缓存清理并重新安装了最新版本的 atom。

我的 atom 包目录中的 node-gyp 重建每次都失败。而且我无法安装 autocomplete-clang 包。同样的错误。 错误消息表明 runas 存在问题。因此,在每个步骤中,我还通过 npm 安装了 runas。

这真的很浪费时间,我完全没有想法。

更新:

使用最新版本的 atom 我无法重现错误

最佳答案

使用最新版本的 atom,我无法重现此错误。

关于javascript - 原子编辑器 : node-gyp rebuild crashes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26275881/

相关文章:

javascript - 用表情符号替换字符串的最有效方法

javascript - 我想检测鼠标移动事件期间鼠标右键还是左键按下

python - 2d numpy.array() 将一个字符串与所有其他字符串进行比较,并对每个字符串重复

node.js - 指定 Controller 的返回内容类型

javascript - GNOME 中鼠标进入屏幕特定像素范围时的激活方法

javascript - 如何使用参数在 node.js 中进行 Curl 调用

python 多进程与两个列表比较

python - 对列表的单个元素进行排序

javascript - Node.js Express 接收 postman 为空

javascript - 如何将 Angular 和 Nodejs 安装在同一文件夹中