【发布时间】:2022-01-19 05:12:23
【问题描述】:
当我尝试创建服务器时,它会抛出一个 500 错误,并且在终端中显示以下错误:
[SSR] Error transforming virtual:C:/Users/User/Documents/CODING/Ted's/.nuxt/plugins/server.mjs: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
我尝试运行npm cache clean --force
我已经多次重新安装 npm,因为每个人都拥有它所在目录的完整权限,以管理员身份运行 VSCode,我没有想法。
【问题讨论】:
-
I am entirely new at JS and don't even understand why this error is occurring是不属于标题的内容。甚至在问题正文中,也没有添加任何有意义的信息。
标签: javascript node.js nuxt.js