symfony / symfony

The Symfony PHP framework
https://symfony.com
MIT License
29.8k stars 9.47k forks source link

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

Closed stevelewis3 closed 8 months ago

stevelewis3 commented 8 months ago

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

smnandre commented 8 months ago

It should be fixed in #54079

stof commented 8 months ago

Duplicate of https://github.com/symfony/symfony/issues/54078

stevelewis3 commented 8 months ago

Apologies for the duplication, I only searched open issues.