Nextjs 10.0.6 在 vercel 502`TOO_MANY_FILESYSTEM_CHECKS` 上重写错误

时间:2021-07-06 23:16:34

标签: deployment next.js vercel

我在 TOO_MANY_FILESYSTEM_CHECKS 上遇到 Vercel 错误,尝试使用 rewrite 进行 api 调用以将请求路由到 api。在本地一切正常。

next.config:

 module.exports = {
  reactStrictMode: true,
  async rewrites() {
    return [
      {
        source: '/my-api/:path*',
        destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`,
      },
    ]
  },
}

用法

import {GraphQLClient} from "graphql-request"
...
...
export default new GraphQLClient("/my-api/graphql")

相同的代码在 next@11.0.1 上运行良好。请指点一下??

0 个答案:

没有答案