当我运行命令“npm install robotjs -g”时,它给了我这个错误 .

robotjs@0.5.1安装C:\ Users \ Ehsan \ AppData \ Roaming \ npm \ node_modules \ robotjs prebuild-install || node-gyp rebuild prebuild-install WARN安装没有找到预建的二进制文件(target = 8.11.3 runtime = node arch = x64 platform = win32)C:\ Users \ Ehsan \ AppData \ Roaming \ npm \ node_modules \ robotjs> if if not defined npm_config_node_gyp (节点“C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ node-gyp-bin \ .... \ node_modules \ node-gyp \ bin \ node-gyp.js”rebuild)else(节点“C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ bin \ node-gyp.js”rebuild)C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ gyp \ pylib \ gyp \ input.py:891:警告:'as'将成为Python 2.6 Traceback中的保留关键字(最近一次调用最后一次):文件“C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ gyp \ gyp_main.py“,第13行,在导入gyp中导入gyp文件”C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ gyp \ pylib \ gyp__init __ . py“,第8行 . 输入文件“C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ gyp \ pylib \ gyp \ input.py”,第891行除了ImportErr或者作为e:^ SyntaxError:无效语法gyp ERR!配置错误gyp ERR!堆栈错误:gyp失败,退出代码:1 gyp ERR!堆栈在ChildProcess.onCpExit(C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ lib \ configure.js:336:16)gyp ERR!堆栈在emitTwo(events.js:126:13)gyp ERR!在ChildProcess.emit堆栈(events.js:214:7)gyp ERR! Process.ChildProcess._handle.onexit(internal / child_process.js:198:12)gyp ERR!系统Windows_NT 10.0.17133 gyp ERR!命令“C:\ Program Files \ nodejs \ node.exe”“C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ bin \ node-gyp.js”“rebuild”gyp ERR! cwd C:\ Users \ Ehsan \ AppData \ Roaming \ npm \ node_modules \ robotjs gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR!不行npm ERR!代码ELIFECYCLE npm ERR!错误1 npm ERR! robotjs@0.5.1 install:prebuild-install || node-gyp rebuild npm ERR!退出状态1 npm ERR!错误的ERR!在robotjs@0.5.1安装脚本失败 . 错误的ERR!这可能不是npm的问题 . 上面可能有额外的日志记录输出 . 错误的ERR!可以在以下位置找到此运行的完整日志:npm ERR! C:\ Users \用户伊赫桑\应用程序数据\漫游\ NPM-cache_logs \ 2018-10-29T09_19_13_980Z-的debug.log