Ruby on rails 6: how to upgrade node version on webpacker 5.2.1?

I try to deploy the rails 6 App on platformsh, I have this error when deploying my project in Rails 6 with Webpacker 5.2.1.

I have done days of research on google, without success. I have NVM installed locally, node and npm, I will say that everything is fine locally, the webpacker is compiled correctly, but not on the remote machine. and this error makes the deployment fail.

    W: Webpacker requires Node.js ">=10.17.0" and you are using v6.17.1
    W: Please upgrade Node.js
    W: Exiting!
  E: Error building project: Step failed with status code 1.

E: Error: Unable to build application, aborting.

when I want to compile the assets with this line on Build hook.

RAILS_ENV=production bundle exec rails webpacker:install

can you help me I’ll share my config

    # The name of this app. Must be unique within a project.
name: app
type: 'ruby:2.7'
      source: local
      source_path: log
      source: local
      source_path: tmp
    postgresdatabase: 'dbpostgres:postgresql'
# The size of the persistent disk of the application (in MB).
disk: 1024
    build: |
      bundle install --without development test
      RAILS_ENV=production bundle exec rails webpacker:install               
    deploy: |
      RAILS_ENV=production bundle exec rake db:migrate 
    socket_family: "unix"
    start: "unicorn -l $SOCKET -E production"
      root: "public"
      passthru: true
      expires: 1h
      allow: true


# The type of your service (postgresql), which uses the format
# 'type:version'. Be sure to consult the PostgreSQL documentation
# (
# when choosing a version. If you specify a version number which is not available,
# the CLI will return an error.
type: postgresql:13
 # The disk attribute is the size of the persistent disk (in MB) allocated to the service.
disk: 9216
    - plpgsql
    - pgcrypto
    - uuid-ossp


    # Each route describes how an incoming URL is going to be processed by
    type: upstream
    upstream: "app:http"

    type: redirect
    to: "https://www.{default}/"

Hi @kam-vakaramoko. It looks like you’ll need to upgrade the version of Node.js in your Ruby container. Here is a guide for how to use NVM during the build hook to install whichever version you may need