/api 在 symfony 应用程序中没有很好地发挥作用

问题描述 投票:0回答:1

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

symfony api-platform.com
1个回答
0
投票

启动时我也遇到同样的问题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").

© www.soinside.com 2019 - 2024. All rights reserved.