Deploy SSR on Heroku



  • Hi everyone,

    I am deploying an SSR application for the first time using Quasar to Heroku but I am getting an error.

    My setting scripts in package:

        "build:ssr": "quasar build -m ssr",
        "build": "yarn && yarn build:ssr",
        "heroku-postbuild": "yarn && yarn build",
    

    however in heroku this is the error:

    [5/5] Building fresh packages...
           success Saved lockfile.
           $ yarn && yarn build:ssr
           [1/5] Validating package.json...
           [2/5] Resolving packages...
           success Already up-to-date.
           $ quasar build -m ssr
    /bin/sh: 1: quasar: not found
    error Command failed with exit code 127.
           info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    error Command failed with exit code 127.
           info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    error Command failed with exit code 127.
           info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    -----> Build failed
    

    Quasar command is not found. Do you know why? How to can I deploy?



  • Ok, this is my history to long hours to work… After resting and really thinking about what I was doing, I realized that I was doing everything the other way around … stress can play tricks on you. 😞

    Well, I was loading my DEV project to Heroku … ufff OMG!!!😫 , sometimes one goes from being an 8 generation i7 processor to being an MMX 233🤖 .

    In summary, I uploaded my dist/ssr folder to heroku and properly configured the script to first install the dependencies and then run the application🤩 . Everything works now😎 .

    "scripts": { "start": "node index.js", "build": "yarn" },

    Patience, patience, patience… myselft! 🤷🏽♂




Log in to reply