运行命令npm install -g jhipster-uml
时使用Windows 10我出现以下错误:
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的一个问题。
我也尝试使用纱线安装它,我有一个非常类似的错误。
答案 0 :(得分:0)
找不到Python可执行文件“ python”,您可以设置PYTHON env变量。