Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GiantappMan opened this issue Aug 23, 2021 · 1 comment

Comments

@GiantappMan
Copy link
Contributor

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

@starkwang
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants