本文介绍了Node.js的问题::角没有定义::不能罚款凉亭包:: nodegyp VS的Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:
生成并开始我的新jHipster API浏览器后,我得到了以下问题:

Issue:after generating and starting my new jHipster API in the browser I got the following issue:

未捕获的Ref​​erenceError:角没有定义

生成之前,我安装了最新的:

Before the generation I installed the latest:


  • 的node.js


  • 亭子

  • 咕噜-CLI
    根据

  • node.js
  • yo
  • bower
  • grunt-cli according to the guidelines

的产生,我得到了以下警告和错误:

During the generation I got the following warning and errors:

我都做了。运行安装NPM和放大器;亭子安装为您安装
  所需的依赖关系。如果失败,尝试运行命令
  你自己。

[email protected]安装
  K:\\工作\\ HP_AIC_WebAdmin_Customization \\工作区\\ aicwebadminapi \\ node_modules \\ bufferutil
  节点石膏重建
  K:\\工作\\ HP_AIC_WebAdmin_Customization \\工作区\\ aicwebadminapi \\ node_modules \\ bufferutil>如果
  没有定义npm_config_node_gyp(节点
  \"C:\\Users\\korban\\AppData\\Roaming\
pm\
ode_modules\
pm\\bin\
ode-gyp-bin....\
ode_modules\
ode-gyp\\bin\
ode-gyp.js\"
  重建)其他(节点重建)石膏ERR!配置错误石膏ERR!堆
  错误:无法找到Python的可执行文件蟒蛇,可以设置PYTHON
  环境变量。石膏ERR!在堆叠failNoPython
  (C:\\用户\\ korban \\应用程序数据\\漫游\\故宫\\ node_modules \\故宫\\ node_modules \\节点石膏\\ lib目录\\ configure.js:401:14)
  石膏ERR!在堆叠
  C:\\用户\\ korban \\应用程序数据\\漫游\\故宫\\ node_modules \\故宫\\ node_modules \\节点石膏\\ lib目录\\ configure.js:356:11
  石膏ERR!在堆叠FSReqWrap.oncomplete(fs.js:82:15)石膏ERR!系统
  Windows_NT 6.1.7601石膏ERR!命令C:\\ PROGRAM
  文件\\的NodeJS \\ node.exe
  C:\\用户\\ korban \\应用程序数据\\漫游\\故宫\\ node_modules \\故宫\\ node_modules \\节点石膏\\ BIN \\节点gyp.js
  重建GYP ERR! CWD
  K:\\工作\\ HP_AIC_WebAdmin_Customization \\工作区\\ aicwebadminapi \\ node_modules \\ bufferutil
  石膏ERR!节点-v V5.3.0石膏ERR!节点石膏-v V3.2.1石膏ERR!不好
  NPM WARN安装:[email protected] [email protected]安装:节点石膏
  重建NPM WARN安装:[email protected]退出状态1

[email protected] install K:\work\HP_AIC_WebAdmin_Customization\workspace\aicwebadminapi\node_modules\bufferutil node-gyp rebuild K:\work\HP_AIC_WebAdmin_Customization\workspace\aicwebadminapi\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\korban\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node 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 failNoPython (C:\Users\korban\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14) gyp ERR! stack at C:\Users\korban\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\korban\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd K:\work\HP_AIC_WebAdmin_Customization\workspace\aicwebadminapi\node_modules\bufferutil gyp ERR! node -v v5.3.0 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm WARN install:[email protected] [email protected] install: node-gyp rebuild npm WARN install:[email protected] Exit status 1

[email protected]安装
  K:\\工作\\ HP_AIC_WebAdmin_Customization \\工作区\\ aicwebadminapi \\ node_modules \\ UTF-8验证
  节点石膏重建
  K:\\工作\\ HP_AIC_WebAdmin_Customization \\工作区\\ aicwebadminapi \\ node_modules \\ UTF-8验证>如果没有定义npm_config_node_gyp(节点
  \"C:\\Users\\korban\\AppData\\Roaming\
pm\
ode_modules\
pm\\bin\
ode-gyp-bin....\
ode_modules\
ode-gyp\\bin\
ode-gyp.js\"
  重建)其他(节点重建)石膏ERR!配置错误石膏ERR!堆
  错误:无法找到Python的可执行文件蟒蛇,可以设置PYTHON
  环境变量。石膏ERR!在堆叠failNoPython
  (C:\\用户\\ korban \\应用程序数据\\漫游\\故宫\\ node_modules \\故宫\\ node_modules \\节点石膏\\ lib目录\\ configure.js:401:14)
  石膏ERR!在堆叠
  C:\\用户\\ korban \\应用程序数据\\漫游\\故宫\\ node_modules \\故宫\\ node_modules \\节点石膏\\ lib目录\\ configure.js:356:11
  石膏ERR!在堆叠FSReqWrap.oncomplete(fs.js:82:15)石膏ERR!系统
  Windows_NT 6.1.7601石膏ERR!命令C:\\ PROGRAM
  文件\\的NodeJS \\ node.exe
  C:\\用户\\ korban \\应用程序数据\\漫游\\故宫\\ node_modules \\故宫\\ node_modules \\节点石膏\\ BIN \\节点gyp.js
  重建GYP ERR! CWD
  K:\\工作\\ HP_AIC_WebAdmin_Customization \\工作区\\ aicwebadminapi \\ node_modules \\ UTF-8验证
  石膏ERR!节点-v V5.3.0石膏ERR!节点石膏-v V3.2.1石膏ERR!不好
  NPM WARN安装:[email protected] [email protected]~~MD~~aux安装:
  节点石膏重建NPM WARN安装:[email protected]退出状态1
  NPM WARN可选跳跃失败可选依赖
  / chokidar / fsevents:NPM WARN notsup不与您的操作系统兼容
  或体系结构:[email protected]鲍尔角咏叹调#1.4.8 ENOGIT
  Git是不是在路径中运行:开发ngconstant安装或不
  (ngconstant)任务在创建模块aicwebadminapiApp
  钢骨混凝土/主/ web应用/脚本/应用/ app.constants.js ... OK

[email protected] install K:\work\HP_AIC_WebAdmin_Customization\workspace\aicwebadminapi\node_modules\utf-8-validate node-gyp rebuild K:\work\HP_AIC_WebAdmin_Customization\workspace\aicwebadminapi\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\korban\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node 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 failNoPython (C:\Users\korban\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14) gyp ERR! stack at C:\Users\korban\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\korban\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd K:\work\HP_AIC_WebAdmin_Customization\workspace\aicwebadminapi\node_modules\utf-8-validate gyp ERR! node -v v5.3.0 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm WARN install:[email protected] [email protected] install: node-gyp rebuild npm WARN install:[email protected] Exit status 1 npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: [email protected] bower angular-aria#1.4.8 ENOGIT git is not installed or not in the PATH Running "ngconstant:dev" (ngconstant) task Creating module aicwebadminapiApp at src/main/webapp/scripts/app/app.constants.js...OK

运行wiredep:应用程序(wiredep)任务警告:错误:找不到在哪里
  你把你的包鲍尔。使用--force继续。

Running "wiredep:app" (wiredep) task Warning: Error: Cannot find where you keep your Bower packages. Use --force to continue.

中止由于警告。

我做了很长的研究有关:


  • node_gyp VS Python的问题

  • 找不到凉亭包的问题

  • 角没有定义的问题

但我没有找到一个有效的解决方案。

but I didn't find a working solution.

注意: MVN全新安装和MVN春季启动:运行成功运行

Note: mvn clean install and mvn spring-boot:run are running successfully!

如果您有任何有用的想法分享此我真的AP preaciate吧!

If you have any useful thoughts to share about this I would really appreaciate it!

感谢您对您的帮助提前!

Thank you for your help in advance!

@@@@@@@@@@@@@@@@@@@@@@@@

@@@@@@@@@@@@@@@@@@@@@@@@

最终的解决方案

修正了node_gyp VS Python的问题:


  • 降级到:Node.js的4.2.3 LTS和NPM 2.14.7,

  • 的Python 2.7.10 和Visual Studio防爆preSS ( www.microsoft.com/en-gb/download/details.aspx?id=44914 的),以及
    (见节点石膏依赖关系: github.com/nodejs/node-gyp#installation 的)

  • Downgrade to: Node.js 4.2.3 LTS and npm 2.14.7,
  • install Python 2.7.10 and Visual Studio Express (www.microsoft.com/en-gb/download/details.aspx?id=44914) as well (see node-gyp dependencies:github.com/nodejs/node-gyp#installation)

修正了找不到凉亭包的问题和角没有定义的问题:

注:的全部使用RFF-医生的第一个(的 github.com/rakuten-frontend/rff-doctor 的),以验证系统配置使用约曼,步兵和鲍尔等它会告诉你缺什么,以及如何可以购买它/他们。

Note: First of all use rff-doctor(github.com/rakuten-frontend/rff-doctor) to verify system configuration for using Yeoman, Grunt and Bower etc. It will show you what is missing and how can you purchase it/them.

什么是缺少我的情况:


  • 安装的Git( git-scm.com/downloads 的),并设置它使用https,而不是混帐使用下面的命令:混帐配置--global网址HTTPS ://.insteadOf的git://

  • 安装Ruby(的 www.ruby-lang.org / 的),并将其添加到PATH

  • 安装使用萨斯宝石:创业板安装SASS 并addig到PATH

  • installing Git(git-scm.com/downloads) and setting it for using https instead of git with the following command: git config --global url."https://".insteadOf git://
  • installing Ruby(www.ruby-lang.org/) and adding it to the PATH
  • installing Sass using gem: gem install sass and addig it to the PATH

推荐答案

很少有人建议在Windows设置你的环境的NodeJS:

Few advices for setting up your NodeJS environment on Windows:


  • 请不要安装最后版本的NodeJS,而安装最新的LTS版(长期支持)

  • 请不要使用NPM 3尚未

  • 请不要使用深层项目文件夹的路径(如K:\\工作\\ HP_AIC_WebAdmin_Customization \\工作区\\ aicwebadminapi \\)。作为故宫可能会碰到的Windows最大路径长度为您node_modules含量

  • 安装Python 2.x的不3.x中

考虑使用或其它NVM状工具安装节点。

Consider using nodist or another nvm-like tool to install node.

您还必须解决的git的错误,凉亭需要的git在NPM注册表中找不到一些模块。你必须通过安装的git,并确​​保在'混帐'命令在您的路径可重试凉亭安装命令'之前修复您的环境。有些Git是正确安装,但因为它是由企业防火墙阻止无法工作。

You must also solve the git error, bower needs git for some modules not found in npm registry. You must fix your environment by installing git and making sure that the 'git' command is available in your path before retrying 'bower install command'. Some git is correctly installed but cannot work because it is blocked by a corporate firewall.

您也可以尝试运行像来测试诊断工具的对于git的,咕噜咕噜,凉亭和节点的环境。不要按照其对Ruby和上海社会科学院建议,因为JHipster并不需要他们(它通过咕噜/一饮而尽使用libsass)。

You could also try to run a diagnostic tool like rff-doctor to test your environment for git, grunt, bower and node. Don't follow its recommendation about Ruby and SASS as JHipster does not require them (it uses libsass through grunt/gulp).

这篇关于Node.js的问题::角没有定义::不能罚款凉亭包:: nodegyp VS的Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 00:16