【问题标题】:can't deploy jhipster-registry with heroku无法使用 heroku 部署 jhipster-registry
【发布时间】:2025-11-23 21:20:07
【问题描述】:

我尝试使用按钮 deploy to heroku 部署默认 jhipster 注册表,但失败了。

谁能帮帮我?

参数:

应用名称 我的应用程序注册表

选择地区美国

JHIPSTER_PASSWORD ******

JAVA_OPTS -Xmx256m -Xss512k -Dfile.encoding=UTF-8

MAVEN_CUSTOM_OPTS -Pprod,heroku -DskipTests

NPM_CONFIG_PRODUCTION 假的

日志:

   binding.target.mk:115: recipe for target 'Release/obj.target/binding/src/binding.o' failed
   make: *** [Release/obj.target/binding/src/binding.o] Error 1
   make: Leaving directory '/tmp/build_e5224961c3b8d6585d4f090ac485ceae/node_modules/node-sass/build'
   gyp ERR! build error
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/tmp/build_e5224961c3b8d6585d4f090ac485ceae/node_modules/node-gyp/lib/build.js:285:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
   gyp ERR! System Linux 4.4.0-1014-aws
   gyp ERR! command
   "/tmp/build_e5224961c3b8d6585d4f090ac485ceae/.heroku/node/bin/node"
   "/tmp/build_e5224961c3b8d6585d4f090ac485ceae/node_modules/node-gyp/bin/node-gyp.js"
   "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags="
   "--libsass_ldflags=" "--libsass_library="
   gyp ERR! cwd > 
   /tmp/build_e5224961c3b8d6585d4f090ac485ceae/node_modules/node-sass
   gyp ERR! node -v v10.0.0
   gyp ERR! node-gyp -v v3.6.0
   gyp ERR! not ok
   Build failed with error code: 1
   -----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys

   Some possible problems:

   - Dangerous semver range (>) in engines.node
   https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version

   Love,
   Heroku
     !     Push rejected, failed to compile Node.js app.  !     Push failed

【问题讨论】:

标签: heroku jhipster jhipster-registry


【解决方案1】:

此问题是由于与 Node 10 不兼容造成的。此问题已在 JHipster Registry 代码中由 pull request 修复。 Deploy to Heroku 按钮现在可以正常工作了

【讨论】:

    【解决方案2】:

    这个问题是由 node-saas 引起的,它没有设法为您的环境下载有效的二进制文件,因此它正在尝试从头开始重建 C++ 代码,这似乎在 Heroku 运行程序中不可用。

    请升级到 node-saas v4.9.0,这是第一个支持 Node 10 的版本:https://github.com/sass/node-sass/releases/tag/v4.9.0

    【讨论】: