- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
问题:在浏览器中生成并启动我的新 jHipster API 后,我遇到了以下问题:
Uncaught ReferenceError : Angular 未定义
在这一代之前我安装了最新的:
在生成期间,我收到以下警告和错误:
I'm all done. Running npm install & bower install for you to install the required dependencies. If this fails, try running the command yourself.
bufferutil@1.2.1 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:bufferutil@1.2.1 bufferutil@1.2.1 install: node-gyp rebuild npm WARN install:bufferutil@1.2.1 Exit status 1
utf-8-validate@1.2.1 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:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: node-gyp rebuild npm WARN install:utf-8-validate@1.2.1 Exit status 1 npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.6 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
Running "wiredep:app" (wiredep) task Warning: Error: Cannot find where you keep your Bower packages. Use --force to continue.
Aborted due to warnings.
我对以下方面进行了长时间的调查:
但我没有找到可行的解决方案。
注意: mvn clean install 和 mvn spring-boot:run 运行成功!
如果您对此有任何有用的想法可以分享,我将不胜感激!
提前感谢您的帮助!
@@@@@@@@@@@@@@@@@@@@@
最终解决方案
修复 node_gyp 与 Python 问题:
修复“找不到 bower 包”问题和“未定义 Angular ”问题:
注意:首先使用 rff-doctor(github.com/rakuten-frontend/rff-doctor) 验证使用 Yeoman、Grunt 和 Bower 的系统配置等等。它会告诉你缺少什么以及你如何购买它/它们。
我的案例中缺少什么:
git config --global url。"https://".insteadOf git://
gem install sass
并将其添加到 PATH最佳答案
在 Windows 上设置 NodeJS 环境的一些建议:
考虑使用 nodist或其他类似 nvm 的工具来安装 Node 。
你还必须解决 git 错误,bower 需要 git 来处理一些在 npm 注册表中找不到的模块。在重试“bower install command”之前,您必须通过安装 git 并确保“git”命令在您的路径中可用来修复您的环境。某些 git 已正确安装但无法工作,因为它被公司防火墙阻止。
您也可以尝试运行像 rff-doctor 这样的诊断工具为 git、grunt、bower 和 node 测试你的环境。不要遵循它关于 Ruby 和 SASS 的建议,因为 JHipster 不需要它们(它通过 grunt/gulp 使用 libsass)。
关于python - Node.js 问题::Angular 未定义::找不到 bower 包::node gyp vs Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34399362/
我正在尝试在 Windows 上运行的小于 1GB 的 VM 上设置 YouTrack 和 TeamCity。使用率将非常低(用户和请求)。这是一个 POC 环境,如果它有效,我可能会将它推送到一个超
所以我在尝试使用 FORFILES 解决这个问题时遇到了麻烦。我正在尝试获取不超过 4 天的文件。所以基本上少于 4 天。然而,这似乎不太可能,因为/d -4 获取所有 4 天或更早的项目。 以下是我
如何从下面的 events 表中选择小于 15 分钟前创建的 events? CREATE TABLE events ( created_at timestamp NOT NULL DEFAU
Google Analytics Realtime提供 rt:minutesAgo ,可以过滤查询。 然而,它是一个维度而不是一个度量标准,<=不能在过滤器中使用。 假设我想在最后 n 分钟内获得一些
iOS 核心数据 - 严重的应用程序错误 - 尝试插入 nil 你好, 我的应用程序实际上运行稳定,但在极少数情况下它会崩溃并显示此错误消息... 2019-04-02 20:48:52.437172
我想制作一个 html div 以快速向右移动(例如不到 1 秒)并消失。然后1秒后再次直接出现在这个过程最开始div的位置。此过程将由单击按钮并重复 10 次触发。 我试图在 CSS 中使用过渡属性
我发现使用 TimeTrigger 是 Windows 10 (UWP) 上计划后台任务的方式。但是看起来我们需要给出的最小数字是 15 分钟。只是想知道,即使我们安排它在接下来的 1 分钟内运行,警
我必须在 1 秒内在屏幕上打印 2^20 行整数 printf 不够快,还有其他易于使用的快速输出替代方法吗? 每一行只包含 1 个整数。 我要求它用于竞争性编程问题,我必须将其源代码提交给法官。 最
我是一名优秀的程序员,十分优秀!