Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ImeDa's avatar
Level 3

Vapor: Error when deploying application

Hi guys,

I'm deploying laravel application via Vapor and getting 502 bad gateway error.

Error inside log file:

Caching Laravel configuration{"message":"include(/var/task/vendor/composer/../laravel/nova/src/NovaCoreServiceProvider.php): failed to open stream: No such file or directory","context":{"exception":{"class":"ErrorException","message":"include(/var/task/vendor/composer/../laravel/nova/src/NovaCoreServiceProvider.php): failed to open stream: No such file or directory","code":0,"file":"/var/task/vendor/composer/ClassLoader.php:444"},"aws_request_id":null},"level":400,"level_name":"ERROR","channel":"development","datetime":"2019-12-19T13:16:21.867261+00:00","extra":{}}

Vapor.yml file:

development:
        memory: 1024
        cli-memory: 512
        build:
            - 'composer install'
            - 'php artisan event:cache'
            - 'npm ci && npm run prod && rm -rf node_modules'

Even tried to print something in public/index.php file and then exit() it, so there should not be any need to require vendor files, but still getting the exact same error.

Any ideas ?

0 likes
10 replies
kilrizzy's avatar

Same issue here, did you ever end up having any luck with this?

kilrizzy's avatar

Update, was able to get some help from support. In my case, simply disabling symlinking did the trick:

"repositories": [
        {
            "type": "path",
            "url": "./nova",
            "options": {
                "symlink": false
            }
        }
    ],
shylor's avatar

I'm still seeing a lot of 502 errors around forms that fail validation. It's really annoying because I see no way to troubleshoot these on vapor.

martijnimhoff's avatar

@kilrizzy that did not work for me. My repositories section is a little bit different:

    "repositories": [
        {
            "type": "composer",
            "url": "https://nova.laravel.com"
        },
        {
            "type": "path",
            "url": "./nova-components/CumulDashboard",
            "options": {
                "symlink": false
            }
        },
        {
            "type": "path",
            "url": "./nova-components/Theme",
            "options": {
                "symlink": false
            }
        }
    ]
mibou520's avatar

It did not work for me too. Were you able to find the solution?

kurucu's avatar

Enable logging to something like Bugsnag and/or deploy telescope in production (temporarily) gated to your e-mail address.

ImeDa's avatar
Level 3

Sorry guys, I was not able to fix the issue, too. Think it's still a new thing and I'm not gonna waste a lot of time on it. I'll wait until it gets more stable.

david's avatar

Try this:

COMPOSER_MIRROR_PATH_REPOS=1 composer install

1 like
alxndrmlr's avatar

Thanks so much @david!

BTW I ran into this today, finally found this thread and got my stuff working (I was building a custom filter https://nova.laravel.com/docs/4.0/customization/filters.html#building-filters) and ran into this when trying to deploy via Chipper on Vapor.

I also found reference to this on https://chipperci.com/docs/deploy/vapor/ docs

FWIW david, it would be awesome to have this a "Deploying" section to the nova docs after this section https://nova.laravel.com/docs/4.0/customization/filters.html#compiling-assets that mentions this re: vapor

Please or to participate in this conversation.