【发布时间】:2019-04-02 04:44:30
【问题描述】:
当我运行命令“npm install robotjs -g”时,它给了我这个错误。
robotjs@0.5.1 安装 C:\Users\Ehsan\AppData\Roaming\npm\node_modules\robotjs 预构建安装 ||节点gyp重建
prebuild-install WARN install 未找到预构建的二进制文件 (target=8.11.3 runtime=node arch=x64 platform=win32)
C:\Users\Ehsan\AppData\Roaming\npm\node_modules\robotjs>如果没有定义 npm_config_node_gyp (节点 "C:\Program 文件\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" 重建)否则(节点“C:\ Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" 重建)C:\程序 文件\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py:891: 警告:'as' 将成为 Python 2.6 Traceback 中的保留关键字 (最近一次通话最后):文件“C:\ Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", 第 13 行,在 导入 gyp 文件 "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp__init__.py", 第 8 行,在 导入 gyp.input 文件 "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", 第 891 行 除了 ImportError 作为 e: ^ SyntaxError: 无效的语法 gyp ERR!配置错误gyp ERR!堆栈错误:
gyp失败,退出代码:1 吉普错误! ChildProcess.onCpExit (C:\Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16) 吉普错误!堆栈在 emitTwo (events.js:126:13) gyp ERR!堆栈在 ChildProcess.emit (events.js:214:7) 错误错误!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) 吉普错误!系统 Windows_NT 10.0.17133 gyp 错误!命令“C:\程序 文件\nodejs\node.exe" "C:\Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" “重建” gyp ERR! cwd C:\Users\Ehsan\AppData\Roaming\npm\node_modules\robotjs gyp 错误!节点 -v v8.11.3 gyp 错误!节点-gyp -v v3.6.2 gyp 错误!不好 npm ERR!代码 ELIFECYCLE npm 错误! errno 1 npm 错误!机器人js@0.5.1 安装:prebuild-install || node-gyp rebuildnpm 错误!退出状态 1 npm ERR! npm 错误!在 robotjs@0.5.1 安装脚本中失败。 npm 错误!这是 npm 可能不是问题。可能有额外的日志记录 上面的输出。npm 错误!可以在以下位置找到此运行的完整日志:npm ERR!
C:\Users\Ehsan\AppData\Roaming\npm-cache_logs\2018-10-29T09_19_13_980Z-debug.log
【问题讨论】:
标签: javascript node.js npm backend