我创建了 symfony6 项目并尝试应用 api patform。当我启动 http://127.0.0.1:8000/api 时,我收到了带有此错误的 json 响应 '在渲染模板期间抛出异常(“Symfony\Component\AssetMapper\Compiler\JavaScriptImportPathCompiler:: compile(): 返回值必须是字符串类型,返回 null")。' 我通过命令 symfony require api 安装了 api。 我期待 api/平台接口的推出。
启动时我也遇到同样的问题http://127.0.0.1:8000/api 错误:
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").