Heroku-EmberJS-部署失败(无法下载节点)

时间:2020-08-04 11:25:56

标签: node.js heroku ember.js

当我尝试在Heroku上推送代码时,由于节点问题,构建/部署失败。

控制台日志

cd dungeon-diary
heroku buildpacks:set https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz   
git push heroku master

输出控制台出错

    remote: Building source:
    remote: 
    remote: -----> emberjs app detected
    remote: -----> Setting NPM_CONFIG_PRODUCTION to false to install ember-cli toolchain
    remote: -----> Fetching buildpack heroku/nodejs-v98
    remote: -----> Node.js detected
    remote: 
    remote: -----> Creating runtime environment
    remote:        
    remote:        NPM_CONFIG_LOGLEVEL=error
    remote:        NPM_CONFIG_PRODUCTION=false
    remote:        NODE_ENV=production
    remote:        NODE_MODULES_CACHE=true
    remote:        NODE_VERBOSE=false
    remote: 
    remote: -----> Installing binaries
    remote:        engines.node (package.json):  10.* || >= 12
    remote:        engines.npm (package.json):   6.x
    remote:        
    remote:        Resolving node version 10.* || >= 12 via semver.io...
    remote:        Downloading and installing node 14.7.0...
    remote:        Unable to download node 14.7.0; does it exist?** 
    remote: 
    remote: -----> Build failed

package.json

  "engines": {
    "node": "10.* || >= 12"
  },

1 个答案:

答案 0 :(得分:0)

问题是...

在您看到的日志中,控制台会自行选择节点14.7.0, 但是对于Heroku来说,这是不可接受的。所以我必须明确地写出使用哪个版本(以避免14.7.0),它才能开始工作:)

...对我来说很奇怪,为什么控制台选择了不受支持的版本:)