Skip to content

JavaScriptImportPathCompiler::compile(): Return value must be of type string, null returned #54127

@stevelewis3

Description

@stevelewis3

Symfony version(s) affected

7.0.4

Description

Yesterday I updated symfony/asset-mapper to version 7.0.4 and received the following error:

An exception has been thrown during the rendering of a template ("Symfony\Component\AssetMapper\Compiler\JavaScriptImportPathCompiler::compile(): Return value must be of type string, null returned").

It occurs from this line in one of my twig templates (and other similar importmap() calls in other templates.

{% block importmap %}    
    {{ importmap(getImports(['home', 'news-popup'])) }}
{% endblock %}

For now I've rolled back to symfony/asset-mapper 7.0.2.

How to reproduce

Updated symfony/asset-mapper to 7.0.4

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions