Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

231
Visualizações
How do I make Heroku use node 14.x instead of 12.x?

I need Heroku to use NodeJS 14 instead of 12, how do I do that? On my computer I'm using Node 14, and I'm defining it in engines on package.json (at the root of my repo):

{
  "engines": {
    "node": "14.x"
  }
  ...
}

I have both the heorku/nodejs as well as the heroku/rails buildpack installed because this is a Ruby on Rails apps with webpack:

enter image description here

But when running my tests is Heroku, I get this error:

Error: Missing binding /app/node_modules/node-sass/vendor/linux-x64-72/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 12.x
Found bindings for the following environments:
  - Linux 64-bit with Unsupported runtime (88)

If I workaround the problem in the CI, I still run into trouble when deploying:

-----> Installing node-v12.16.2-linux-x64
-----> Installing yarn-v1.22.4
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       yarn install v1.22.4
       [1/5] Validating package.json...
       error imok@0.1.0: The engine "node" is incompatible with this module. Expected version "14.x". Got "12.16.2"
       error Found incompatible module.
       info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

In the documentation it says:

If you need a specific version of node for your Ruby application you should use multiple buildpacks to first install node then install Ruby.

which means if you deployed a Rails application, you need to remove all buildpacks and then re-add them in the correct order, first heroku/node and then heroku/rails.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda