小编Nad*_*ror的帖子

无法在 Vercel 上使用 serverSideTranslations

在我的索引页中,我正在使用serverSideTranslations函数。查找翻译文件时出现错误。此错误仅发生在使用 的页面上serverSideTranslations

我部署到 Vercel 和 Netlify。在他们两个中我都遇到了同样的错误。

_app.js我正在使用appWithTranslation.

依赖项:

"dependencies": {
    "@fortawesome/fontawesome-free": "^5.15.4",
    "@netlify/plugin-nextjs": "^3.9.2",
    "axios": "^0.21.1",
    "bootstrap": "^4.6.0",
    "dayjs": "^1.10.4",
    "dotenv": "^8.2.0",
    "fs-extra": "^10.0.0",
    "is-mobile": "^3.0.0",
    "next": "^11.1.2",
    "next-i18next": "^8.9.0",
    "next-seo": "^4.20.0",
    "node-fetch": "^2.6.1",
    "parse": "^3.1.0",
    "react": "17.0.1",
    "react-bootstrap": "^1.5.0",
    "react-dom": "17.0.1",
    "react-infinite-scroller": "^1.2.4",
    "recoil": "^0.1.2",
    "sass": "^1.43.2",
    "ts-node": "^9.1.1"
  }
Run Code Online (Sandbox Code Playgroud)

next.config.js

const path = require('path');
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
const i18NextConfig = require('./next-i18next.config');

const prodConfig = {
    generateBuildId: () …
Run Code Online (Sandbox Code Playgroud)

netlify next.js vercel next-i18next

6
推荐指数
2
解决办法
4933
查看次数

标签 统计

netlify ×1

next-i18next ×1

next.js ×1

vercel ×1