cloudbase-framework icon indicating copy to clipboard operation
cloudbase-framework copied to clipboard

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

Open GiantappMan opened this issue 3 years ago • 1 comments

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

GiantappMan avatar Aug 23 '21 13:08 GiantappMan

是编译的bug,我们会尽快修复,目前可以考虑将 async 语法改为使用 Promise

starkwang avatar Aug 24 '21 12:08 starkwang