gpt4 book ai didi

node.js - 安装 jhipster-uml 时出现问题

转载 作者:太空宇宙 更新时间:2023-11-03 22:24:43 26 4
gpt4 key购买 nike

使用 Windows 10,当我运行命令 npm install -g jhipster-uml 时出现以下错误:

C:\Users\Talon\AppData\Roaming\npm\jhipster-uml -> C:\Users\Talon\AppData\Roaming\npm\node_modules\jhipster-uml\jhipster-uml.js

> deasync@0.1.9 install C:\Users\Talon\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync
> node ./build.js


C:\Users\Talon\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "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\Talon\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! deasync@0.1.9 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the deasync@0.1.9 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Talon\AppData\Roaming\npm-cache\_logs\2018-01-11T14_51_34_388Z-debug.log

谷歌搜索似乎是 npm_config_node_gyp 的 Windows 问题。我尝试使用 npm cli 安装其他软件包并且它有效,所以这很可能是 jhipster-uml 的问题。

我也尝试使用yarn来安装它,我有一个非常类似的错误。

最佳答案

Can't find Python executable "python", you can set the PYTHON env variable.

  1. 您必须安装 python 并重新启动 bash
  2. 如果 python 已安装,请检查它在您的 PATH 中是否可用。如果没有,只需添加即可。

关于node.js - 安装 jhipster-uml 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48209999/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com