Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

nuxt.config.js 编译有bug,ReferenceError: regeneratorRuntime is not defined #235

Description

@GiantappMan

nuxt.config.js,编译后导致bug

错误信息: Code: 1 ScfRequestId: 410fc4b9-0419-11ec-8a36-aecf2ad7e05e Error: ReferenceError: regeneratorRuntime is not defined at /var/user/nuxt.config.js:43:51 at Object.<anonymous>

image

重现步骤

  1. 创建nuxt-ssr 模板
 cloudbase init --template nuxt-ssr
 npm run deploy

此时一切正常

  1. 修改nuxt.config.js 文件,添加routes定义
{
...
 routes: async () => {
   return []
 },
...
}

上传

 npm run deploy

访问网页提示报错 regeneratorRuntime is not defined
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions