Skip to content

[LiveComponent] Module not found: "./assets/bootstrap.js" contains a reference to the file "@symfony/ux-live-component". #179

@johanv

Description

@johanv

Today I updated my app to Symfony 5.3.11, and I also updated symfony/ux-live-compoment (currently at revision e382fc0). Doing this triggered this error in my ci/cd pipeline when running yarn encore dev:

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

I am not very good at frontend technology, but I managed to work around this problem by changing the line

import LiveController from '@symfony/ux-live-component';

in assets/bootstrap.js by

import LiveController from '@symfony/ux-live-component/dist/live_controller';

I doubt this is a correct solution. But I'm not sure either if I found a bug, or if something is wrong in my webpack-configuration.

Anyway, I've reported the problem, maybe it's of some use :-)

Thanks for providing this cool technology; keep up the good work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBug Fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions