cloudbase-framework
cloudbase-framework copied to clipboard
nuxt.config.js 编译有bug,ReferenceError: regeneratorRuntime is not defined
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>
重现步骤
- 创建nuxt-ssr 模板
cloudbase init --template nuxt-ssr
npm run deploy
此时一切正常
- 修改nuxt.config.js 文件,添加routes定义
{
...
routes: async () => {
return []
},
...
}
上传
npm run deploy
访问网页提示报错 regeneratorRuntime is not defined
是编译的bug,我们会尽快修复,目前可以考虑将 async 语法改为使用 Promise