Platform.sh : problem while deploying symfony app

141 Views Asked by At

I tried to deploy symfony app using :

symfony cloud:deploy

But I got this erro:

Module build failed: Module not found:
"./assets/bootstrap.js" contains a reference to the file "./controllers".
This file can not be found, please check it for typos or update it if the file got moved.

The push completed but there was a deployment error ("Error building project").
// ./assets/bootstrap.js

import { startStimulusApp } from '@symfony/stimulus-bridge';

// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp(require.context(
    '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
    true,
    /\.[jt]sx?$/
));

// register any custom, 3rd party controllers here
// app.register('some_controller_name', SomeImportedController);

On a local server it works fine and i tried everything explained here : https://symfony.com/doc/current/deployment.html

I commented out all of the bootstrap.js file and the deployment worked, but i really need its features.

0

There are 0 best solutions below